name: next-build on: push: branches: [next] concurrency: group: alkane-toolkit-next cancel-in-progress: false permissions: contents: write jobs: # Windows build of the candidate (see release.yml's windows job); the # candidate job attaches its zip next to the Linux tarball. windows: runs-on: alkane-ci container: image: gitea.bluefla.re/blueflare/alkane-ci@sha256:8f20439b38ae1c070b1a692a89c084f69134f4fa16a755d02783f621cd9ac041 env: CARGO_TARGET_DIR: target CARGO_BUILD_JOBS: 2 WX_WINDOWS_PREFIX: /root/.cache/wx-3.3.3-mingw steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Select candidate version id: version run: bash ci/compute-rc-version.sh >> "$GITHUB_OUTPUT" - name: Install Windows toolchain if: steps.version.outputs.release == 'true' run: bash ci/windows-ci.sh toolchain - name: Configure bounded Rust compiler cache if: steps.version.outputs.release == 'true' run: bash ci/configure-rust-cache.sh - name: Compute wxMSW cache key if: steps.version.outputs.release == 'true' id: wx-key run: bash ci/wx-cache-key.sh windows - name: Check prebuilt wxMSW if: steps.version.outputs.release == 'true' id: wx-image run: bash ci/check-wx-image-prefix.sh windows - id: wx-cache if: steps.version.outputs.release == 'true' && steps.wx-image.outputs.available != 'true' uses: actions/cache/restore@v4 continue-on-error: true with: path: /root/.cache/wx-3.3.3-mingw key: ${{ steps.wx-key.outputs.key }} - name: Build wxMSW if: steps.version.outputs.release == 'true' id: wx-build run: bash ci/ensure-wx-prefix.sh windows - name: Save vendored wxMSW build if: steps.version.outputs.release == 'true' && steps.wx-cache.outputs.cache-hit != 'true' && steps.wx-build.outputs.built == 'true' uses: actions/cache/save@v4 continue-on-error: true with: path: /root/.cache/wx-3.3.3-mingw key: ${{ steps.wx-key.outputs.key }} - name: Build Windows candidate if: steps.version.outputs.release == 'true' run: bash ci/windows-ci.sh build - name: Package Windows candidate if: steps.version.outputs.release == 'true' run: bash ci/windows-ci.sh package "${{ steps.version.outputs.version }}" - uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7 if: steps.version.outputs.release == 'true' with: name: alkane-toolkit-windows path: dist/alkane-toolkit-v*-windows-x86_64.zip - name: Clean generated Toolkit build if: always() run: python3 ci/cleanup-generated.py candidate: needs: windows runs-on: alkane-ci container: image: gitea.bluefla.re/blueflare/alkane-ci@sha256:8f20439b38ae1c070b1a692a89c084f69134f4fa16a755d02783f621cd9ac041 env: CARGO_TARGET_DIR: target CARGO_BUILD_JOBS: 2 WX_PREFIX: /root/.cache/wx-3.3.3-linux WX_RS_WXCONFIG: /root/.cache/wx-3.3.3-linux/bin/wx-config steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Check runner image pins run: python3 ci/check-runner-image.py - name: Install build dependencies run: bash ci/ensure-build-deps.sh base - name: Configure bounded Rust compiler cache run: bash ci/configure-rust-cache.sh - name: Compute wxWidgets cache key id: wx-key run: bash ci/wx-cache-key.sh - name: Check prebuilt wxWidgets id: wx-image run: bash ci/check-wx-image-prefix.sh - id: wx-cache if: steps.wx-image.outputs.available != 'true' uses: actions/cache/restore@v4 continue-on-error: true with: path: /root/.cache/wx-3.3.3-linux key: ${{ steps.wx-key.outputs.key }} - name: Build wxWidgets id: wx-build run: bash ci/ensure-wx-prefix.sh - name: Save vendored wxWidgets build if: steps.wx-cache.outputs.cache-hit != 'true' && steps.wx-build.outputs.built == 'true' uses: actions/cache/save@v4 continue-on-error: true with: path: /root/.cache/wx-3.3.3-linux key: ${{ steps.wx-key.outputs.key }} - name: Build release candidate run: cargo build --release -p alkane-gui -p alkane-artifacts -p alkane-flash -p alkane-cli --offline - name: Select candidate version id: version run: bash ci/compute-rc-version.sh >> "$GITHUB_OUTPUT" - name: Package candidate if: steps.version.outputs.release == 'true' run: | mkdir -p dist cp target/release/alkane-toolkit dist/ tar -C dist -czf "dist/alkane-toolkit-${{ steps.version.outputs.version }}-linux-x86_64.tar.gz" alkane-toolkit - name: Fetch Windows candidate if: steps.version.outputs.release == 'true' uses: https://github.com/ChristopherHX/gitea-download-artifact@75635f32b4c1c41c4b3d64e8f85210112ed4c9c7 with: name: alkane-toolkit-windows path: dist/windows - name: Create private prerelease if: steps.version.outputs.release == 'true' env: GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} run: | set -euo pipefail V="${{ steps.version.outputs.version }}" WIN="dist/windows/alkane-toolkit-v${V}-windows-x86_64.zip" [ -s "$WIN" ] || { echo "Windows candidate for ${V} is missing" >&2; exit 1; } python3 ci/release-rc.py "${{ steps.version.outputs.tag }}" true \ "dist/alkane-toolkit-${V}-linux-x86_64.tar.gz" "$WIN" - name: Rust compiler cache statistics if: always() run: | if [ -n "${SCCACHE_DIR:-}" ]; then sccache --show-stats fi - name: Clean generated Toolkit build if: always() run: python3 ci/cleanup-generated.py