build_servers_vip.yml 2.6 KB

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