build_servers_packetversions.yml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. name: Build servers with different packet versions
  2. # build_servers_packetversions.yml
  3. concurrency:
  4. group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
  5. cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
  6. on:
  7. push:
  8. branches:
  9. - master
  10. pull_request:
  11. paths:
  12. # Always trigger all Github Actions if an action or something CI related was changed
  13. - '.github/workflows/**'
  14. - 'tools/ci/**'
  15. # This workflow should run when a file in a source directory has been modified.
  16. - 'src/**'
  17. - '3rdparty/**'
  18. jobs:
  19. build:
  20. # Github Actions checks for '[ci skip]', '[skip ci]', '[no ci]', '[skip actions]', or '[actions skip]' but not a hyphenated version.
  21. # It's a catch-all incase a Pull Request has been opened and someone is on auto-pilot.
  22. if: "!contains(github.event.head_commit.message, 'ci-skip')"
  23. runs-on: ${{ matrix.os }}
  24. strategy:
  25. matrix:
  26. # The ubuntu-latest label currently points to ubuntu-22.04.
  27. # Available: ubuntu-22.04, ubuntu-20.04
  28. os: [ubuntu-latest]
  29. # Older versions of GCC are not available via unaltered aptitude repo lists.
  30. gcc: ['11']
  31. # We run build checks for both Renewal and PRE-Renewal
  32. mode: ['PRE','RE']
  33. # Check build success for different packet-versions
  34. packetver: ['20211103', '20200902', '20200401', '20180620', '20151104']
  35. steps:
  36. - uses: actions/checkout@v2
  37. # A simple 'yes' and 'no' can be confusing, so we use names to display in the current job then convert them for use in the compiler.
  38. - name: Variable Parsing - PRE
  39. if: ${{ matrix.mode == 'PRE' }}
  40. run: |
  41. echo "PRERE=yes" >> $GITHUB_ENV
  42. - name: Variable Parsing - RE
  43. if: ${{ matrix.mode == 'RE' }}
  44. run: |
  45. echo "PRERE=no" >> $GITHUB_ENV
  46. - name: Update & Install packages
  47. # Ubuntu runners already have most of the packages rAthena requires to build.
  48. # https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md
  49. run: |
  50. sudo apt update
  51. sudo apt install zlib1g-dev libpcre3-dev gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }}
  52. - name: Start MySQL
  53. run: sudo systemctl start mysql.service
  54. - name: Setup Database and import table data
  55. run: ./tools/ci/sql.sh
  56. - name: Command - configure
  57. env:
  58. CONFIGURE_FLAGS: 'CC=gcc-${{ matrix.gcc }} CXX=g++-${{ matrix.gcc }} --enable-prere=${{ env.PRERE }} --enable-packetver=${{ matrix.packetver }} --enable-buildbot=yes'
  59. run: ./configure $CONFIGURE_FLAGS
  60. - name: Command - make clean
  61. run: make clean
  62. - name: Command - make all
  63. run: make all