build_servers_gcc.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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-22.04.
  28. # Available: ubuntu-22.04, ubuntu-20.04
  29. os: [ubuntu-latest]
  30. # Older versions of GCC are not available via unaltered aptitude repo lists.
  31. gcc: ['9', '10', '11']
  32. steps:
  33. - uses: actions/checkout@v2
  34. - name: Update & Install packages
  35. # Ubuntu runners already have most of the packages rAthena requires to build.
  36. # https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md
  37. run: |
  38. sudo apt update
  39. sudo apt install zlib1g-dev libpcre3-dev gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }}
  40. - name: Command - configure
  41. env:
  42. CONFIGURE_FLAGS: 'CC=gcc-${{ matrix.gcc }} CXX=g++-${{ matrix.gcc }} --enable-buildbot=yes'
  43. run: ./configure $CONFIGURE_FLAGS
  44. - name: Command - make clean
  45. run: make clean
  46. - name: Command - make all
  47. run: make all