Merge remote-tracking branch 'origin/master' into 3.3.0 #828
This file contains hidden or 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: Continuous Integration | |
| on: [ push, pull_request ] | |
| jobs: | |
| build: | |
| name: ${{ matrix.config.name }} | |
| runs-on: ${{ matrix.config.os }} | |
| defaults: | |
| run: | |
| shell: ${{ matrix.config.shell }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - name: "macOS arm64" | |
| os: macos-latest | |
| release: true | |
| shell: bash | |
| package_name: "mac_arm64" | |
| artifact-path: build/*.dmg | |
| - name: "macOS x64" | |
| os: macos-13 | |
| release: true | |
| shell: bash | |
| package_name: "mac_x64" | |
| artifact-path: build/*.dmg | |
| - name: "Linux GCC" | |
| os: ubuntu-24.04 | |
| shell: bash | |
| package_name: "linux_gcc" | |
| artifact-path: build/* | |
| - name: "Linux Clang" | |
| os: ubuntu-24.04 | |
| shell: bash | |
| extra_options: "-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++" | |
| package_name: "linux_clang" | |
| artifact-path: build/* | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Install Dependencies (macOS) | |
| if: runner.os == 'macOS' | |
| run: brew install fluidsynth freetype glm lua mpg123 sfml wxwidgets dylibbundler create-dmg webp | |
| - name: Install Dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get upgrade | |
| sudo apt-get install \ | |
| libfluidsynth-dev libwebp-dev libglm-dev libfreetype-dev \ | |
| liblua5.4-dev libmpg123-dev libsfml-dev libwxgtk3.2-dev | |
| - name: Configure | |
| run: | | |
| mkdir build | |
| cmake -B build ${{ matrix.config.extra_options }} . | |
| - name: Build | |
| run: | | |
| export MAKEFLAGS=--keep-going | |
| cmake --build build --parallel 3 | |
| - name: Package (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| cd build | |
| dylibbundler -od -b -x slade.app/Contents/MacOS/slade -d slade.app/Contents/MacOS/libs -p @executable_path/libs | |
| for i in {1..10}; | |
| do | |
| if create-dmg --app-drop-link 10 10 ./slade_${{ matrix.config.package_name }}_${{ github.ref_name }}.dmg ./slade.app; | |
| then | |
| echo "slade_${{ matrix.config.package_name }}_${{ github.ref_name }}.dmg created" | |
| break | |
| else | |
| echo "create-dmg failed $i" | |
| fi | |
| done | |
| - name: Upload Artifacts | |
| if: ${{ matrix.config.package_name }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.config.package_name }} | |
| path: ${{ matrix.config.artifact-path }} | |
| - name: Release | |
| if: ${{ contains(github.ref, 'tags') && matrix.config.release }} | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| name: ${{ github.ref_name }} | |
| allowUpdates: true | |
| omitBodyDuringUpdate: true | |
| artifacts: ${{ matrix.config.artifact-path }} |