Merge branch 'master' of https://github.com/pionere/devilutionX into … #5959
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CMake | |
# When creating a new workflow in GitHub’s action builder the default trigger is the push event. We want to extend this to push and pull request events. | |
on: [push, pull_request] | |
env: | |
buildDir: '${{ github.workspace }}/build' | |
jobs: | |
build: | |
# The CMake configure and build commands are platform agnostic and should work equally | |
# well on Windows or Mac. You can convert this to a matrix build if you need | |
# cross-platform coverage. | |
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Create Build Environment | |
run: > | |
sudo apt-get update && | |
sudo apt-get install -y cmake gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 pkg-config-mingw-w64-x86-64 libz-mingw-w64-dev dpkg-dev wget git sudo && | |
sudo rm /usr/x86_64-w64-mingw32/lib/libz.dll.a && | |
sudo Packaging/windows/mingw-prep.sh | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{github.workspace}} | |
run: cmake -S. -Bbuild -D CMAKE_BUILD_TYPE="Release" -D DEVILUTIONX_SYSTEM_LIBSODIUM=OFF -D DEVILUTIONX_STATIC_LIBSODIUM=OFF -D DEVILUTIONX_SYSTEM_SDL2=OFF -D SCREEN_READER_INTEGRATION=ON -D CMAKE_TOOLCHAIN_FILE=../CMake/mingwcc64.toolchain.cmake | |
# working-directory: ${{github.workspace}} | |
# run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DCPACK=ON -DCMAKE_TOOLCHAIN_FILE=../CMake/platforms/mingwcc64.toolchain.cmake -DDEVILUTIONX_SYSTEM_BZIP2=OFF -DDEVILUTIONX_STATIC_LIBSODIUM=ON -DDISCORD_INTEGRATION=ON | |
- name: Build | |
working-directory: ${{ env.buildDir }} | |
shell: bash | |
# Execute the build (-j 2 : with two cores). | |
run: cmake --build . -j 2 --target package --config Release | |
- name: Show content of workspace | |
run: find $RUNNER_WORKSPACE | |
shell: bash | |
# Upload the created artifact | |
- name: Upload | |
if: ${{ !env.ACT }} | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{ env.buildDir }}/devilutionx.zip | |
name: diablo-test-x86.zip |