cmake: remove boost leftover #39
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: build and test | |
on: [push] | |
jobs: | |
build_and_test: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: ubuntu-20.04 | |
compiler: g++-9 | |
compiler_c: gcc-9 | |
extra_cmake_args: -GNinja | |
- platform: ubuntu-20.04 | |
compiler: clang++-10 | |
compiler_c: clang-10 | |
extra_cmake_args: -GNinja | |
- platform: windows-2019 | |
compiler: msvc2019 ## == vs 16 | |
compiler_c: msvc2019 | |
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-20.04' }} | |
- name: "dependency: clang (linux)" | |
run: sudo apt update && sudo apt install clang-10 | |
if: ${{ matrix.platform == 'ubuntu-20.04' && matrix.compiler == 'clang++-10' }} | |
- name: "dependency: ninja (linux)" | |
run: sudo apt update && sudo apt install ninja-build | |
if: ${{ matrix.platform == 'ubuntu-20.04' }} | |
- name: "dependency: qt5 (linux)" | |
run: sudo apt update && sudo apt install -y qtbase5-dev qt5-default | |
if: ${{ matrix.platform == 'ubuntu-20.04' }} | |
- name: "dependency: qt5 (windows)" | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: 5.15.1 | |
arch: win64_msvc2019_64 | |
if: ${{ matrix.platform == 'windows-2019' }} | |
- 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-20.04' }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.platform }}-${{ matrix.compiler }}-appimage | |
path: Noggit*.AppImage | |
if: ${{ matrix.platform == 'ubuntu-20.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-2019' }} | |
shell: bash | |
- run: | | |
mkdir dependencies/plugins/ | |
cp -av "${{ env.QT_PLUGIN_PATH }}/" dependencies/ | |
if: ${{ matrix.platform == 'windows-2019' }} | |
shell: bash | |
- uses: vimtor/action-zip@v1 | |
with: | |
dest: noggit-${{ matrix.platform }}-${{ matrix.compiler }}-dependencies-${{ github.sha }}.zip | |
files: dependencies/ | |
if: ${{ matrix.platform == 'windows-2019' }} | |
- 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-2019' }} | |
- 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 |