{ name: CI, on: { push: { branches: [ master, ci, builds ] }, pull_request: { branches: [ master ] } }, jobs: { macos-xcode: { runs-on: macos-12, env: { DEVELOPER_DIR: /Applications/Xcode_13.4.app/Contents/Developer }, steps: [ { name: checkout, uses: actions/checkout@v2, with: { submodules: true } }, { name: install Boost, run: brew install Boost }, { name: install SFML, run: ./.github/workflows/scripts/mac/install-sfml.sh }, { name: patch Xcode project, run: ./.github/workflows/scripts/mac/fix-xcode-proj.sh }, { name: build, run: ./.github/workflows/scripts/mac/xcode-build.sh }, { name: unit tests, run: ./.github/workflows/scripts/mac/run-tests.sh } ] }, macos-scons: { runs-on: macos-12, env: { MACOSX_DEPLOYMENT_TARGET: '10.15', PROD_MACOS_CERTIFICATE: '${{ secrets.PROD_MACOS_CERTIFICATE }}', PROD_MACOS_CERTIFICATE_PWD: '${{ secrets.PROD_MACOS_CERTIFICATE_PWD }}', PROD_MACOS_CERTIFICATE_NAME: '${{ secrets.PROD_MACOS_CERTIFICATE_NAME }}', PROD_MACOS_CI_KEYCHAIN_PWD: '${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }}', PROD_MACOS_NOTARIZATION_APPLE_ID: '${{ secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}', PROD_MACOS_NOTARIZATION_TEAM_ID: '${{ secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}', PROD_MACOS_NOTARIZATION_PWD: '${{ secrets.PROD_MACOS_NOTARIZATION_PWD }}' }, steps: [ { name: checkout, uses: actions/checkout@v2, with: { submodules: true } }, { name: Cache Boost, uses: actions/cache@v2, with: { path: '${{ runner.workspace }}/boost_*.tar.gz', key: 'boost-1.85.0' } }, { name: Build Boost, id: boost, uses: egor-tensin/build-boost@v1, with: { version: 1.85.0, libraries: filesystem system, platform: x64, configuration: Release }, }, { name: Build SFML, id: sfml, uses: oprypin/install-sfml@v1, with: { sfml: 2.6.1, config: Release } }, { name: install build dependencies, run: brew install scons }, { name: build and unit test, run: './.github/workflows/scripts/mac/scons-build.sh INCLUDEPATH="${{ steps.boost.outputs.root }}:${{steps.sfml.outputs.path}}/include" LIBPATH="${{ steps.boost.outputs.librarydir }}:${{steps.sfml.outputs.path}}/lib" FRAMEWORKPATH="${{steps.sfml.outputs.path}}/lib"', }, { name: codesign the app, if: "${{ github.ref == 'refs/heads/builds' }}", run: './.github/workflows/scripts/mac/sign-apps.sh', }, { name: 'Tar files', run: 'tar -cvf cboe-mac.tar "Blades of Exile"', working-directory: '${{ github.workspace }}/build' }, { name: 'Upload Artifact', uses: actions/upload-artifact@v4, with: { name: cboe-mac, path: '${{ github.workspace }}/build/cboe-mac.tar' } } ] }, win-vs32: { runs-on: windows-2019, env: { VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" }, steps: [ { name: Export GitHub Actions cache environment variables, uses: actions/github-script@v7, with: { script: "core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');" } }, { name: checkout, uses: actions/checkout@v2, with: { submodules: true } }, { name: install dependencies, run: '${{ github.workspace }}\.github\workflows\scripts\win\install-deps.bat x86', working-directory: proj/vs2017 }, { name: build, run: '.\.github\workflows\scripts\win\msvc-build.bat x86' } ] }, win-vs64: { runs-on: windows-2019, env: { VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" }, steps: [ { name: Export GitHub Actions cache environment variables, uses: actions/github-script@v7, with: { script: "core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');" } }, { name: checkout, uses: actions/checkout@v2, with: { submodules: true } }, { name: install dependencies, run: '${{ github.workspace }}\.github\workflows\scripts\win\install-deps.bat x64', working-directory: proj/vs2017 }, { name: build, run: '.\.github\workflows\scripts\win\msvc-build.bat x64' }, { name: unit tests, run: '.\.github\workflows\scripts\win\run-tests.bat' } ] }, win-scons: { runs-on: windows-2019, env: { VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" }, steps: [ { name: Export GitHub Actions cache environment variables, uses: actions/github-script@v7, with: { script: "core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');" } }, { name: checkout, uses: actions/checkout@v2, with: { submodules: true } }, { name: install build dependencies, run: 'vcpkg install libxml2 && pip install scons' }, { name: install dependencies, run: '${{ github.workspace }}\.github\workflows\scripts\win\install-deps.bat x64', working-directory: proj/vs2017 }, { name: build and unit test, run: '.\.github\workflows\scripts\win\scons-build.bat' }, { name: 'Tar files', run: 'tar -cvf cboe-win.tar "Blades of Exile"', working-directory: '${{ github.workspace }}/build' }, { name: 'Upload Artifact', uses: actions/upload-artifact@v4, with: { name: cboe-win, path: '${{ github.workspace }}/build/cboe-win.tar' } }, ] }, # win-mingw: { # runs-on: windows-2019, # steps: [ # { # name: checkout, # uses: actions/checkout@v2, # with: { submodules: true } # }, # { # name: install build dependencies, # run: 'vcpkg install libxml2 && pip install scons' # }, # { # name: install dependencies, # run: 'vcpkg install', # working-directory: proj/vs2017 # }, # { # name: build and unit test, # run: scons toolset=mingw # } # ] # }, linux: { runs-on: ubuntu-22.04, steps: [ { name: checkout, uses: actions/checkout@v2, with: { submodules: true } }, { name: install dependencies, run: 'sudo apt-get update && sudo apt-get install scons libxml2-utils zlib1g libsfml-dev libboost-all-dev zenity' }, { name: install TGUI, run: 'sudo ./.github/workflows/scripts/linux/install-tgui.sh' }, { name: build and unit test, run: CCFLAGS=-fdiagnostics-color=always scons }, { name: 'Tar files', run: 'tar -cvf cboe-linux.tar "Blades of Exile"', working-directory: '${{ github.workspace }}/build' }, { name: 'Upload Artifact', uses: actions/upload-artifact@v4, with: { name: cboe-linux, path: '${{ github.workspace }}/build/cboe-linux.tar' } } ], } } }