build_servers_gcc.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. name: Build servers with GCC
  2. # build_servers_gcc.yml
  3. concurrency:
  4. group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
  5. cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
  6. on:
  7. workflow_dispatch:
  8. push:
  9. branches:
  10. - master
  11. pull_request:
  12. paths:
  13. # Always trigger all Github Actions if an action or something CI related was changed
  14. - '.github/workflows/**'
  15. - 'tools/ci/**'
  16. # This workflow should run when a file in a source directory has been modified.
  17. - 'src/**'
  18. - '3rdparty/**'
  19. jobs:
  20. build:
  21. # Github Actions checks for '[ci skip]', '[skip ci]', '[no ci]', '[skip actions]', or '[actions skip]' but not a hyphenated version.
  22. # It's a catch-all incase a Pull Request has been opened and someone is on auto-pilot.
  23. if: "!contains(github.event.head_commit.message, 'ci-skip')"
  24. runs-on: ${{ matrix.os }}
  25. strategy:
  26. matrix:
  27. # The ubuntu-latest label currently points to ubuntu-24.04.
  28. # Available: ubuntu-24.04, ubuntu-22.04
  29. os: [ubuntu-latest]
  30. # Older versions of GCC are not available via unaltered aptitude repo lists.
  31. gcc: ['9', '10', '11', '12']
  32. # GCC 13 was removed from 22.04, include it as a separate job
  33. include:
  34. - os: ubuntu-24.04
  35. gcc: 13
  36. steps:
  37. - uses: actions/checkout@v4
  38. - name: Update & Install packages
  39. # Ubuntu runners already have most of the packages rAthena requires to build.
  40. # https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md
  41. run: |
  42. sudo apt update
  43. sudo apt install zlib1g-dev libpcre3-dev gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }}
  44. - name: Command - configure
  45. env:
  46. CONFIGURE_FLAGS: 'CC=gcc-${{ matrix.gcc }} CXX=g++-${{ matrix.gcc }}'
  47. # -Werror: to treat all warnings as errors
  48. # -Wno-error=builtin-declaration-mismatch: otherwise ./configure checks fail
  49. run: ./configure $CONFIGURE_FLAGS --enable-buildbot=yes CXXFLAGS='-Werror -Wno-error=builtin-declaration-mismatch'
  50. - name: Command - make clean
  51. run: make clean
  52. - name: Command - make all
  53. run: make all