build_servers_packetversions.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. 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: ['11']
  32. # We run build checks for both Renewal and PRE-Renewal
  33. mode: ['PRE','RE']
  34. # Check build success for different packet-versions
  35. packetver: ['20211103', '20200902', '20200401', '20180620', '20151104']
  36. steps:
  37. - uses: actions/checkout@v4
  38. # 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.
  39. - name: Variable Parsing - PRE
  40. if: ${{ matrix.mode == 'PRE' }}
  41. run: |
  42. echo "PRERE=yes" >> $GITHUB_ENV
  43. - name: Variable Parsing - RE
  44. if: ${{ matrix.mode == 'RE' }}
  45. run: |
  46. echo "PRERE=no" >> $GITHUB_ENV
  47. - name: Update & Install packages
  48. # Ubuntu runners already have most of the packages rAthena requires to build.
  49. # https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md
  50. run: |
  51. sudo apt update
  52. sudo apt install zlib1g-dev libpcre3-dev gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }}
  53. - name: Start MySQL
  54. run: sudo systemctl start mysql.service
  55. - name: Setup Database and import table data
  56. run: ./tools/ci/sql.sh
  57. - name: Command - configure
  58. env:
  59. CONFIGURE_FLAGS: 'CC=gcc-${{ matrix.gcc }} CXX=g++-${{ matrix.gcc }} --enable-prere=${{ env.PRERE }} --enable-packetver=${{ matrix.packetver }} --enable-buildbot=yes'
  60. run: ./configure $CONFIGURE_FLAGS
  61. - name: Command - make clean
  62. run: make clean
  63. - name: Command - make all
  64. run: make all