name: Build on: push: paths-ignore: - '*.md' - '*LICENSE' pull_request: env: # SCCACHE_GHA_ENABLED: "true" RUSTC_WRAPPER: "sccache" SENTRY_DSN: ${{ secrets.SENTRY_DSN }} jobs: build-linux: name: Build Linux (${{matrix.name}}) runs-on: ${{matrix.runner}} strategy: fail-fast: false matrix: include: - name: GCC x86_64 runner: [self-hosted, Linux] preset: gcc artifact_arch: x86_64 # - name: GCC aarch64 # runner: ubuntu-24.04-arm # preset: gcc # artifact_arch: aarch64 # - name: Clang x86_64 # runner: ubuntu-latest # preset: clang # artifact_arch: x86_64 steps: - uses: actions/checkout@v6 with: fetch-depth: 0 submodules: recursive - name: Install dependencies if: 'false' # disabled for self-hosted run: | sudo apt-get update sudo apt-get -y install ninja-build clang lld openssl libcurl4-openssl-dev \ zlib1g-dev libglu1-mesa-dev libdbus-1-dev libvulkan-dev libxi-dev libxrandr-dev libasound2-dev \ libpulse-dev libudev-dev libpng-dev libncurses5-dev libx11-xcb-dev libfreetype-dev \ libxinerama-dev libxcursor-dev python3-markupsafe libgtk-3-dev libssl-dev \ libxss-dev libfuse2 libusb-1.0-0-dev libdecor-0-dev libpipewire-0.3-dev libunwind-dev - name: Setup sccache if: 'false' # disabled for self-hosted uses: mozilla-actions/sccache-action@v0.0.9 - name: Print sccache stats run: sccache --show-stats - name: Configure CMake run: cmake --preset x-linux-ci-${{matrix.preset}} - name: Build run: cmake --build --preset x-linux-ci-${{matrix.preset}} - name: Generate AppImage run: ci/build-appimage.sh - name: Upload artifacts if: startsWith(github.event.ref, 'refs/tags/v') uses: actions/upload-artifact@v7 with: name: dusk-${{env.DUSK_VERSION}}-linux-${{matrix.preset}}-${{matrix.artifact_arch}} path: | build/install/Dusk-*.AppImage build/install/debug.tar.* build-apple: name: Build Apple (${{matrix.name}}) runs-on: [self-hosted, macOS] strategy: fail-fast: false matrix: include: - name: AppleClang macOS arm64 platform: macos preset: x-macos-ci-arm64 artifact_name: macos-appleclang-arm64 # - name: AppleClang macOS x86_64 # platform: macos # preset: x-macos-ci-x86_64 # artifact_name: macos-appleclang-x86_64 # - name: AppleClang iOS arm64 # platform: ios # preset: x-ios-ci # artifact_name: ios-appleclang-arm64 # - name: AppleClang tvOS arm64 # platform: tvos # preset: x-tvos-ci # artifact_name: tvos-appleclang-arm64 steps: - uses: actions/checkout@v6 with: fetch-depth: 0 submodules: recursive - name: Install dependencies if: 'false' run: brew install cmake ninja - name: Install Rust iOS target if: matrix.platform == 'ios' run: | rustup toolchain install stable rustup target add aarch64-apple-ios - name: Install Rust tvOS target if: matrix.platform == 'tvos' run: | rustup toolchain install nightly rustup target add --toolchain nightly aarch64-apple-tvos - name: Install Rust x86_64 macOS target if: endsWith(matrix.preset, 'x86_64') run: | rustup toolchain install stable rustup target add x86_64-apple-darwin - name: Setup sccache uses: mozilla-actions/sccache-action@v0.0.9 - name: Configure CMake run: cmake --preset ${{matrix.preset}} - name: Build run: cmake --build --preset ${{matrix.preset}} - name: Upload artifacts if: startsWith(github.event.ref, 'refs/tags/v') uses: actions/upload-artifact@v7 with: name: dusk-${{env.DUSK_VERSION}}-${{matrix.artifact_name}} path: | build/install/Dusk.app build/install/debug.tar.* build-windows: name: Build Windows (${{matrix.name}}) runs-on: ${{matrix.runner}} strategy: fail-fast: false matrix: include: - name: MSVC x86_64 runner: [self-hosted, Windows] preset: msvc msvc_arch: amd64 vcpkg_arch: x64 artifact_arch: x86_64 # - name: MSVC arm64 # runner: windows-11-arm # preset: arm64-msvc # msvc_arch: arm64 # vcpkg_arch: arm64 # artifact_arch: arm64 # - name: Clang x86_64 # runner: windows-latest # preset: clang # msvc_arch: amd64 # vcpkg_arch: x64 # artifact_arch: x86_64 steps: - uses: actions/checkout@v6 with: fetch-depth: 0 submodules: recursive - name: Enable Visual Studio environment uses: ilammy/msvc-dev-cmd@v1 with: arch: ${{matrix.msvc_arch}} # msvc-dev-cmd sets VCPKG_ROOT, set it back - name: Override VCPKG_ROOT run: echo "VCPKG_ROOT=C:\vcpkg" >> $env:GITHUB_ENV - name: Setup sccache uses: mozilla-actions/sccache-action@v0.0.9 - name: Install dependencies if: 'false' # disabled for self-hosted run: | choco install ninja vcpkg install freetype:${{matrix.vcpkg_arch}}-windows-static zstd:${{matrix.vcpkg_arch}}-windows-static - name: Configure CMake run: cmake --preset x-windows-ci-${{matrix.preset}} - name: Build run: cmake --build --preset x-windows-ci-${{matrix.preset}} - name: Upload artifacts if: startsWith(github.event.ref, 'refs/tags/v') uses: actions/upload-artifact@v7 with: name: dusk-${{env.DUSK_VERSION}}-win32-msvc-${{matrix.artifact_arch}} path: | build/install/*.exe build/install/*.dll build/install/res/ build/install/debug.7z