Skip to content

armgit / gecko

Public Imported from GitHub
0

A GameCube/Wii emulator and debugger written in Rust.

nightly releases

Layle3cb7fb565489
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
new file mode 100644
index 0000000..071d20b
--- /dev/null
+++ b/.github/workflows/nightly.yml
@@ -0,0 +1,157 @@
+name: Nightly
+
+on:
+ schedule:
+ - cron: '0 0 * * *'
+ workflow_dispatch:
+
+permissions:
+ contents: write
+
+jobs:
+ check:
+ runs-on: ubuntu-latest
+ outputs:
+ should_build: ${{ steps.check.outputs.should_build }}
+ dev_sha: ${{ steps.check.outputs.dev_sha }}
+ steps:
+ - id: check
+ shell: bash
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ DEV_SHA=$(gh api "repos/${{ github.repository }}/commits/dev" -q .sha)
+ NIGHTLY_SHA=$(gh api "repos/${{ github.repository }}/git/ref/tags/nightly" -q .object.sha 2>/dev/null || echo "")
+ echo "dev HEAD: $DEV_SHA"
+ echo "nightly tag: ${NIGHTLY_SHA:-<none>}"
+ echo "dev_sha=$DEV_SHA" >> "$GITHUB_OUTPUT"
+ if [ -n "$NIGHTLY_SHA" ] && [ "$DEV_SHA" = "$NIGHTLY_SHA" ]; then
+ echo "No new commits on dev since last nightly. Skipping."
+ echo "should_build=false" >> "$GITHUB_OUTPUT"
+ else
+ echo "should_build=true" >> "$GITHUB_OUTPUT"
+ fi
+
+ build:
+ needs: check
+ if: needs.check.outputs.should_build == 'true'
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - os: ubuntu-latest
+ target: x86_64-unknown-linux-gnu
+ suffix: linux-x86_64
+ dbg_suffix: linux-dbg-x86_64
+ - os: windows-latest
+ target: x86_64-pc-windows-msvc
+ suffix: windows-x86_64
+ dbg_suffix: windows-dbg-x86_64
+ - os: macos-latest
+ target: aarch64-apple-darwin
+ suffix: macos-arm64
+ dbg_suffix: macos-dbg-arm64
+
+ runs-on: ${{ matrix.os }}
+
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ ref: dev
+
+ - name: Init submodules
+ run: git submodule update --init --depth 1 --recursive submodules/chipi-spec submodules/solstice
+
+ - uses: dtolnay/rust-toolchain@stable
+ with:
+ targets: ${{ matrix.target }}
+
+ - uses: actions/cache@v4
+ with:
+ path: |
+ ~/.cargo/registry
+ ~/.cargo/git
+ target
+ key: ${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
+ restore-keys: ${{ matrix.target }}-
+
+ - name: Install Linux dependencies
+ if: runner.os == 'Linux'
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y libwayland-dev libxkbcommon-dev libx11-dev libxi-dev libxrandr-dev libxcursor-dev libasound2-dev
+
+ - name: Install mold linker
+ if: runner.os == 'Linux'
+ run: |
+ sudo apt-get update && sudo apt-get install -y mold
+ echo 'RUSTFLAGS=-C link-arg=-fuse-ld=mold' >> $GITHUB_ENV
+
+ - name: Patch Cargo.toml for CI builds
+ shell: bash
+ run: |
+ perl -pi -e 's/^#panic = "abort"$/panic = "abort"/' Cargo.toml
+ perl -pi -e 's/^#codegen-units = 1$/codegen-units = 1/' Cargo.toml
+
+ - name: Build debugger + multitool + gecko-app + tinyapp (release)
+ run: cargo build --release --target ${{ matrix.target }} -p debugger -p multitool -p gecko-app -p tinyapp
+
+ - name: Build debugger + multitool + gecko-app + tinyapp (dev profile, with tracing output)
+ run: cargo build --profile dev --target ${{ matrix.target }} -p debugger -p multitool -p gecko-app -p tinyapp
+
+ - name: Package artifacts
+ shell: bash
+ run: |
+ EXT=""
+ [ "${{ runner.os }}" = "Windows" ] && EXT=".exe"
+
+ mkdir -p artifacts
+
+ package() {
+ local profile=$1 suffix=$2 staging=$3
+ mkdir -p "$staging"
+ cp "target/${{ matrix.target }}/$profile/tinyapp$EXT" "$staging/"
+ cp "target/${{ matrix.target }}/$profile/debugger$EXT" "$staging/"
+ cp "target/${{ matrix.target }}/$profile/multitool$EXT" "$staging/"
+ cp "target/${{ matrix.target }}/$profile/gecko$EXT" "$staging/"
+ cp LICENSE README.md "$staging/"
+ (cd "$staging" && 7z a "../artifacts/gecko-$suffix.zip" *)
+ }
+
+ package release "${{ matrix.suffix }}" staging-rel
+ package debug "${{ matrix.dbg_suffix }}" staging-dbg
+
+ - uses: actions/upload-artifact@v4
+ with:
+ name: binaries-${{ matrix.suffix }}
+ path: artifacts/*
+
+ release:
+ needs: [check, build]
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/download-artifact@v4
+ with:
+ path: artifacts
+ merge-multiple: true
+
+ - name: Delete previous nightly release and tag
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ gh release delete nightly --cleanup-tag --yes --repo ${{ github.repository }} || true
+
+ - name: Create nightly release
+ uses: softprops/action-gh-release@v2
+ with:
+ tag_name: nightly
+ target_commitish: ${{ needs.check.outputs.dev_sha }}
+ name: Nightly (dev)
+ prerelease: true
+ body: |
+ Rolling nightly build of the `dev` branch.
+
+ Commit: ${{ needs.check.outputs.dev_sha }}
+ Built: ${{ github.run_id }}
+ files: artifacts/*
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f438202..a45c96e 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -2,7 +2,7 @@ name: Release
on:
push:
- branches: [master, dev]
+ branches: [master]
workflow_dispatch:
permissions: