github: ci: add bzip2 on linux for stormlib #52
Workflow file for this run
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: build and test | |
| on: [push] | |
| jobs: | |
| build_and_test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: ubuntu-24.04 | |
| compiler: g++-14 | |
| compiler_c: gcc-14 | |
| extra_cmake_args: -GNinja | |
| - platform: ubuntu-24.04 | |
| compiler: clang++-18 | |
| compiler_c: clang-18 | |
| extra_cmake_args: -GNinja | |
| - platform: windows-2025 | |
| compiler: msvc2022 ## == vs 17 | |
| compiler_c: msvc2022 | |
| extra_cmake_args: | |
| runs-on: ${{ matrix.platform }} | |
| name: ${{ matrix.platform }}-${{ matrix.compiler }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: "release dependency: linuxdeployqt (linux)" | |
| run: | | |
| wget "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" -O "${{ runner.workspace }}/linuxdeployqt" | |
| chmod +x "${{ runner.workspace }}/linuxdeployqt" | |
| if: ${{ matrix.platform == 'ubuntu-24.04' }} | |
| - name: "dependency: ninja (linux)" | |
| run: sudo apt update && sudo apt install ninja-build | |
| if: ${{ matrix.platform == 'ubuntu-24.04' }} | |
| - name: "dependency: qt5 (linux)" | |
| run: sudo apt update && sudo apt install -y qtbase5-dev | |
| if: ${{ matrix.platform == 'ubuntu-24.04' }} | |
| - name: "dependency: qt5 (windows)" | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: 5.15.12 | |
| arch: win64_msvc2022_64 | |
| if: ${{ matrix.platform == 'windows-2025' }} | |
| - name: "dependency: bzip2 (linux, stormlib)" | |
| run: sudo apt update && sudo apt install bzip2 | |
| if: ${{ matrix.platform == 'ubuntu-24.04' }} | |
| - name: "dependency: stormlib" | |
| run: | | |
| git clone "https://github.com/ladislav-zezula/StormLib" "${{ runner.workspace }}/stormlib" | |
| cmake -B "${{ runner.workspace }}/stormlib/build" -S "${{ runner.workspace }}/stormlib" -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_C_COMPILER=${{ matrix.compiler_c }} -DCMAKE_INSTALL_PREFIX="${{ runner.workspace }}/stormlib/install" -DCMAKE_BUILD_TYPE=RelWithDebInfo | |
| cmake --build "${{ runner.workspace }}/stormlib/build" --config RelWithDebInfo | |
| cmake --install "${{ runner.workspace }}/stormlib/build" --config RelWithDebInfo | |
| - name: "configure" | |
| run: cmake -Wdev -Wdeprecated --warn-uninitialized -B "${{ github.workspace }}/build" -S "${{ github.workspace }}" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_PREFIX_PATH="${{ runner.workspace }}/stormlib/install" ${{ matrix.extra_cmake_args }} | |
| - name: "build" | |
| run: cmake --build "${{ github.workspace }}/build" --config RelWithDebInfo | |
| - name: "install" | |
| run: cmake --install "${{ github.workspace }}/build" --prefix "${{ github.workspace }}/install" --config RelWithDebInfo | |
| - name: "release: appimage (linux)" | |
| run: | | |
| echo '[Desktop Entry]' > "${{ github.workspace }}/install/default.desktop" | |
| echo 'Type=Application' >> "${{ github.workspace }}/install/default.desktop" | |
| echo 'Name=Noggit 3' >> "${{ github.workspace }}/install/default.desktop" | |
| echo 'Icon=default' >> "${{ github.workspace }}/install/default.desktop" | |
| echo 'Categories=Game;' >> "${{ github.workspace }}/install/default.desktop" | |
| "${{ runner.workspace }}/linuxdeployqt" "${{ github.workspace }}/install/noggit" -appimage -bundle-non-qt-libs -no-strip -verbose=2 | |
| if: ${{ matrix.platform == 'ubuntu-24.04' }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.platform }}-${{ matrix.compiler }}-appimage | |
| path: Noggit*.AppImage | |
| if: ${{ matrix.platform == 'ubuntu-24.04' }} | |
| - run: | | |
| mkdir dependencies/ | |
| cp -av "${{ env.QT_ROOT_DIR }}/bin/Qt5Core.dll" dependencies/ | |
| cp -av "${{ env.QT_ROOT_DIR }}/bin/Qt5Gui.dll" dependencies/ | |
| cp -av "${{ env.QT_ROOT_DIR }}/bin/Qt5OpenGL.dll" dependencies/ | |
| cp -av "${{ env.QT_ROOT_DIR }}/bin/Qt5Widgets.dll" dependencies/ | |
| if: ${{ matrix.platform == 'windows-2025' }} | |
| shell: bash | |
| - run: | | |
| mkdir dependencies/plugins/ | |
| cp -av "${{ env.QT_PLUGIN_PATH }}/" dependencies/ | |
| if: ${{ matrix.platform == 'windows-2025' }} | |
| shell: bash | |
| - uses: vimtor/action-zip@v1 | |
| with: | |
| dest: noggit-${{ matrix.platform }}-${{ matrix.compiler }}-dependencies-${{ github.sha }}.zip | |
| files: dependencies/ | |
| if: ${{ matrix.platform == 'windows-2025' }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.platform }}-${{ matrix.compiler }}-dependencies | |
| path: noggit-${{ matrix.platform }}-${{ matrix.compiler }}-dependencies-${{ github.sha }}.zip | |
| if: ${{ matrix.platform == 'windows-2025' }} | |
| - uses: vimtor/action-zip@v1 | |
| with: | |
| dest: noggit-${{ matrix.platform }}-${{ matrix.compiler }}-${{ github.sha }}.zip | |
| files: install | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.platform }}-${{ matrix.compiler }} | |
| path: noggit-${{ matrix.platform }}-${{ matrix.compiler }}-${{ github.sha }}.zip |