Repository navigation
Fix cursor visibility on startup and focus #312
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 | |
| env: | |
| VK_SDK: '1.4.357.0' | |
| BUILD_TYPE: RelWithDebInfo | |
| BUILD_OFFSET: 3623 # continue from AppVeyor build numbers | |
| on: | |
| push: | |
| branches: [master] | |
| tags: ['*'] | |
| pull_request: | |
| branches: [master] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| setup: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.version.outputs.version }} | |
| semver: ${{ steps.version.outputs.semver }} | |
| steps: | |
| - id: version | |
| run: | | |
| echo "version=OpenGothic v1.0.$((GITHUB_RUN_NUMBER + BUILD_OFFSET))" >> $GITHUB_OUTPUT | |
| echo "semver=1.0.$((GITHUB_RUN_NUMBER + BUILD_OFFSET))" >> $GITHUB_OUTPUT | |
| linux: | |
| needs: setup | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - uses: ./.github/actions/setup-vulkan | |
| with: | |
| os: Linux | |
| vk-sdk: ${{ env.VK_SDK }} | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y glslang-tools libasound2-dev libx11-dev libxcursor-dev | |
| - name: Generate build version | |
| run: | | |
| echo '#pragma once' > game/build.h | |
| echo "static const char* appBuild = \"${{ needs.setup.outputs.version }}\";" >> game/build.h | |
| mkdir -p build/opengothic | |
| echo 'gothic-linux-v${{ needs.setup.outputs.semver }}' >> build/opengothic/VERSION | |
| - name: Configure | |
| run: cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} | |
| - name: Build | |
| run: cmake --build build --target Gothic2Notr Spacer -j $(nproc) | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: opengothic_${{ needs.setup.outputs.semver }}_linux_x64 | |
| path: build/opengothic/Gothic2Notr | |
| linux-deb: | |
| needs: setup | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - uses: ./.github/actions/setup-vulkan | |
| with: | |
| os: Linux | |
| vk-sdk: ${{ env.VK_SDK }} | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential devscripts debhelper cmake g++ \ | |
| glslang-tools libasound2-dev libx11-dev libxcursor-dev | |
| - name: Setup ./debian | |
| run: | | |
| ln -s linux/debian debian | |
| - name: Generate build version | |
| run: | | |
| echo '#pragma once' > game/build.h | |
| echo "static const char* appBuild = \"${{ needs.setup.outputs.version }}\";" >> game/build.h | |
| dch -v "${{ needs.setup.outputs.semver }}" -D unstable -M "Automated build" | |
| - name: Build Debian package | |
| run: | | |
| dpkg-buildpackage -us -uc -b | |
| cp ../opengothic_*.deb opengothic_${{ needs.setup.outputs.semver }}_linux_x64.deb | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: opengothic_${{ needs.setup.outputs.semver }}_linux_x64.deb | |
| path: opengothic_${{ needs.setup.outputs.semver }}_linux_x64.deb | |
| windows: | |
| needs: setup | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - uses: ./.github/actions/setup-vulkan | |
| with: | |
| os: Windows | |
| vk-sdk: ${{ env.VK_SDK }} | |
| - uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: MINGW64 | |
| update: true | |
| install: >- | |
| mingw-w64-x86_64-gcc | |
| mingw-w64-x86_64-cmake | |
| mingw-w64-x86_64-ninja | |
| mingw-w64-x86_64-glslang | |
| - name: Generate build version | |
| shell: pwsh | |
| run: | | |
| echo '#pragma once' > game/build.h | |
| echo "static const char* appBuild = `"${{ needs.setup.outputs.version }}`";" >> game/build.h | |
| mkdir -p build/opengothic | |
| echo 'gothic-win64-v${{ needs.setup.outputs.semver }}' >> build/opengothic/VERSION | |
| - name: Configure | |
| run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} | |
| - name: Build | |
| run: cmake --build build --target Gothic2Notr Spacer | |
| - name: Copy runtime DLLs | |
| run: | | |
| cp "$MINGW_PREFIX/bin/libgcc_s_seh-1.dll" build/opengothic/ | |
| cp "$MINGW_PREFIX/bin/libstdc++-6.dll" build/opengothic/ | |
| cp "$MINGW_PREFIX/bin/libwinpthread-1.dll" build/opengothic/ | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: opengothic_${{ needs.setup.outputs.semver }}_win_x64 | |
| path: | | |
| build/opengothic/*.exe | |
| build/opengothic/*.dll | |
| build/opengothic/*.bat | |
| macos-arm64: | |
| needs: setup | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: brew install glslang | |
| - name: Generate build version | |
| run: | | |
| echo '#pragma once' > game/build.h | |
| echo "static const char* appBuild = \"${{ needs.setup.outputs.version }}\";" >> game/build.h | |
| mkdir -p build/opengothic | |
| echo 'gothic-osx-arm64-v${{ needs.setup.outputs.semver }}' >> build/opengothic/VERSION | |
| - name: Configure | |
| run: cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} | |
| - name: Build | |
| run: cmake --build build --target Gothic2Notr Spacer -j $(sysctl -n hw.ncpu) | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: opengothic_${{ needs.setup.outputs.semver }}_osx_arm64 | |
| path: | | |
| build/opengothic/* | |
| macos-x64: | |
| needs: setup | |
| runs-on: macos-15-intel | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: brew install glslang | |
| - name: Generate build version | |
| run: | | |
| echo '#pragma once' > game/build.h | |
| echo "static const char* appBuild = \"${{ needs.setup.outputs.version }}\";" >> game/build.h | |
| mkdir -p build/opengothic | |
| echo 'gothic-osx-x64-v${{ needs.setup.outputs.semver }}' >> build/opengothic/VERSION | |
| - name: Configure | |
| run: cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} | |
| - name: Build | |
| run: cmake --build build --target Gothic2Notr Spacer -j $(sysctl -n hw.ncpu) | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: opengothic_${{ needs.setup.outputs.semver }}_osx_x64 | |
| path: | | |
| build/opengothic/* | |
| release: | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: [setup, linux, linux-deb, windows, macos-arm64, macos-x64] | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Package release archives | |
| env: | |
| VERSION: ${{ needs.setup.outputs.semver }} | |
| run: | | |
| cd artifacts/opengothic_${VERSION}_linux_x64 && zip -r ../opengothic_${VERSION}_linux_x64.zip . && cd ../.. | |
| cd artifacts/opengothic_${VERSION}_win_x64 && zip -r ../opengothic_${VERSION}_win_x64.zip . && cd ../.. | |
| cd artifacts/opengothic_${VERSION}_osx_arm64 && zip -r ../opengothic_${VERSION}_osx_arm64.zip . && cd ../.. | |
| cd artifacts/opengothic_${VERSION}_osx_x64 && zip -r ../opengothic_${VERSION}_osx_x64.zip . && cd ../.. | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| draft: true | |
| prerelease: true | |
| files: | | |
| artifacts/opengothic_${{ needs.setup.outputs.semver }}_linux_x64.zip | |
| artifacts/opengothic_${{ needs.setup.outputs.semver }}_linux_x64.deb/opengothic_${{ needs.setup.outputs.semver }}_linux_x64.deb | |
| artifacts/opengothic_${{ needs.setup.outputs.semver }}_win_x64.zip | |
| artifacts/opengothic_${{ needs.setup.outputs.semver }}_osx_arm64.zip | |
| artifacts/opengothic_${{ needs.setup.outputs.semver }}_osx_x64.zip |