Preparing release #138
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
| # Github Actions configuration file | |
| name: Build | |
| on: | |
| push: | |
| tags: | |
| - '*.*.*' | |
| # needed for vcpkg caching | |
| permissions: | |
| contents: write | |
| env: | |
| VCPKG_DISABLE_METRICS: true | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.config.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - { | |
| name: "Linux-x64" | |
| , os: ubuntu-22.04 | |
| , VCPKG_TRIPLET: "x64-linux-release" | |
| , VCPKG_PACKAGES: "" | |
| } | |
| - { | |
| # Available Qt versions: https://ddalcino.github.io/aqt-list-server/ | |
| name: "Windows-x64", WIN_ARCH: "x64" | |
| , os: windows-2022 | |
| , QT_VERSION: 6.10.3, QT_INST_DIR: "C:/", QTDIR: "C:/Qt/6.10.3/msvc2022_64", QT_ARCH: win64_msvc2022_64 | |
| , VCPKG_TRIPLET: "x64-windows-release" | |
| , VCPKG_PACKAGES: "OpenImageIO directx-dxc" | |
| } | |
| # - { | |
| # name: "MacOS-x64" | |
| # , os: macos-14 | |
| # , QT_VERSION: 6.10.3, QT_INST_DIR: /Users/runner, QTDIR: /Users/runner/Qt/6.10.3/clang_64 | |
| # , VCPKG_TRIPLET: "x64-osx-release" | |
| # , VCPKG_PACKAGES: "" | |
| # } | |
| steps: | |
| - name: Setup Windows/MSVC | |
| if: runner.os == 'Windows' | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: ${{matrix.config.WIN_ARCH}} | |
| - name: Setup Linux | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt install build-essential git cmake pkg-config qt6-base-dev qt6-declarative-dev libqt6svg6-dev qt6-image-formats-plugins libgl1-mesa-dev libxcb*-dev libx11-dev libxrandr-dev | |
| sudo apt install qml6-module-qtquick qml6-module-qtquick-controls qml6-module-qtquick-shapes | |
| # to fix OIIO: https://github.com/colmap/colmap/issues/3811 | |
| #sudo mkdir -p /usr/include/opencv4 | |
| #sudo apt install qt6-multimedia-dev libopenimageio-dev libopenexr-dev libz-dev openimageio-tools | |
| - name: Install Qt | |
| if: runner.os != 'Linux' | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| aqtversion: '==3.1.*' | |
| py7zrversion: '==0.20.*' | |
| dir: ${{matrix.config.QT_INST_DIR}} | |
| arch: ${{ matrix.config.QT_ARCH }} | |
| version: ${{ matrix.config.QT_VERSION }} | |
| modules: qtmultimedia | |
| cache: true | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| - name: Install vcpkg packages | |
| uses: johnwason/vcpkg-action@v7 | |
| with: | |
| revision: '60d5b6b80f107a200e911ca3820e1eac70675e9d' | |
| pkgs: 'vulkan "ktx[vulkan]" glslang spirv-cross spirv-tools vulkan-memory-allocator spdlog ${{ matrix.config.VCPKG_PACKAGES }}' | |
| triplet: '${{ matrix.config.VCPKG_TRIPLET }}' | |
| token: ${{ github.token }} | |
| - name: Configure CMake | |
| run: cmake -B ${{github.workspace}}/build -DCMAKE_INSTALL_PREFIX=dist -DENABLE_UNITY_BUILD=ON -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${{ matrix.config.VCPKG_TRIPLET }} | |
| - name: Build | |
| run: cmake --build ${{github.workspace}}/build --config Release | |
| - name: Install | |
| run: cmake --install ${{github.workspace}}/build --config Release | |
| - name: Package | |
| run: cpack --config ${{github.workspace}}/build/CPackConfig.cmake | |
| - name: Build AppImage | |
| if: runner.os == 'Linux' | |
| run: | | |
| # to fix qmake: https://askubuntu.com/questions/1460242/ubuntu-22-04-with-qt6-qmake-could-not-find-a-qt-installation-of | |
| sudo qtchooser -install qt6 $(which qmake6) | |
| export QT_SELECT=qt6 | |
| sudo apt-get install libfuse2 | |
| mkdir -p AppDir | |
| cp -R dist AppDir/usr | |
| cp AppDir/usr/share/applications/io.github.houmain.gpupad.desktop AppDir | |
| cp AppDir/usr/share/pixmaps/io.github.houmain.gpupad.png AppDir | |
| wget -nv -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" | |
| chmod a+x linuxdeployqt*.AppImage | |
| export VERSION='${{ github.ref_name }}' | |
| unset QTDIR; unset QT_PLUGIN_PATH; unset LD_LIBRARY_PATH | |
| ./linuxdeployqt*.AppImage AppDir/usr/bin/gpupad -appimage -qmldir=${{github.workspace}}/extra/qml -extra-plugins=iconengines,imageformats -no-translations -no-copy-copyright-files | |
| - name: Upload to Github release | |
| uses: xresloader/upload-to-github-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| file: "*.msi;*.dmg;*.tar.gz;GPUpad*.AppImage" | |
| tags: true | |
| overwrite: true | |