Skip to content

Commit 8d79219

Browse files
committed
WIP - second attempt, now also doing release, not restoring rust cache, full build-quick matrix...
1 parent aeb54d7 commit 8d79219

2 files changed

Lines changed: 36 additions & 28 deletions

File tree

.github/workflows/build-quick.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
script: |
3737
// by default, we will include all 3 platforms we test on
3838
// "latest" would be easy everywhere, but "macos-15" isn't "latest" so we are specific there
39-
let osArray = ["macos-tartelet-26"]
39+
let osArray = ["ubuntu-latest", "windows-latest", "macos-tartelet-26"]
4040
4141
let includeArray = [];
4242
for(const os of osArray) {
@@ -164,7 +164,7 @@ jobs:
164164
165165
- name: Restore Rust Cache (Unix)
166166
uses: actions/cache/restore@v4
167-
if: contains(matrix.os, 'windows') == false
167+
if: contains(matrix.os, 'windows') == false && contains(matrix.os, 'tartelet') == false
168168
with:
169169
path: |
170170
~/.cargo/registry

.github/workflows/build-release.yml

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,21 @@ concurrency:
3232

3333
jobs:
3434
build:
35-
runs-on: macos-15
35+
runs-on: macos-tartelet-26
3636
timeout-minutes: 180
3737
steps:
3838
- uses: actions/checkout@v5
3939

4040
- name: Fetch submodules
4141
run: git submodule update --init
4242

43+
- name: Install macos self-hosted pre-requisites
44+
# All platforms require cargo to build correctly, but our self-hosted tartelet
45+
# image doesn't have cargo (or rustup) installed by default. Easily fixed
46+
# TODO: get the rust toolchain version dynamically from anki/rust-toolchain.toml
47+
run: |
48+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.89.0
49+
4350
- name: Read configured NDK version
4451
run: |
4552
cargo install toml-cli
@@ -70,19 +77,20 @@ jobs:
7077
brew install MaterializeInc/crosstools/x86_64-unknown-linux-gnu
7178
x86_64-unknown-linux-gnu-gcc -v
7279
73-
- name: Restore Rust Cache
74-
uses: actions/cache/restore@v4
75-
with:
76-
path: |
77-
~/.cargo/registry
78-
~/.cargo/git
79-
target
80-
anki/out/rust
81-
anki/out/extracted
82-
anki/out/node_modules
83-
key: ${{ runner.os }}-rust-release-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('anki/yarn.lock') }}
84-
restore-keys: |
85-
${{ runner.os }}-rust-release
80+
# - name: Restore Rust Cache
81+
# uses: actions/cache/restore@v4
82+
# if: contains(runner.os, 'tartelet') == false
83+
# with:
84+
# path: |
85+
# ~/.cargo/registry
86+
# ~/.cargo/git
87+
# target
88+
# anki/out/rust
89+
# anki/out/extracted
90+
# anki/out/node_modules
91+
# key: ${{ runner.os }}-rust-release-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('anki/yarn.lock') }}
92+
# restore-keys: |
93+
# ${{ runner.os }}-rust-release
8694

8795
- name: Setup N2
8896
run: ./anki/tools/install-n2
@@ -148,15 +156,15 @@ jobs:
148156
export NO_CROSS=true
149157
./gradlew rsdroid-testing:publishAllPublicationsToMavenCentral -Dorg.gradle.project.macCC=$ANKIDROID_MACOS_CC -DtestBuildType=debug -Dorg.gradle.daemon=false -Dorg.gradle.console=plain
150158
151-
- name: Save Rust Cache
152-
uses: actions/cache/save@v4
153-
if: github.ref == 'refs/heads/main'
154-
with:
155-
path: |
156-
~/.cargo/registry
157-
~/.cargo/git
158-
target
159-
anki/out/rust
160-
anki/out/download
161-
anki/out/node_modules
162-
key: ${{ runner.os }}-rust-release-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('anki/yarn.lock') }}
159+
# - name: Save Rust Cache
160+
# uses: actions/cache/save@v4
161+
# if: github.ref == 'refs/heads/main'
162+
# with:
163+
# path: |
164+
# ~/.cargo/registry
165+
# ~/.cargo/git
166+
# target
167+
# anki/out/rust
168+
# anki/out/download
169+
# anki/out/node_modules
170+
# key: ${{ runner.os }}-rust-release-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('anki/yarn.lock') }}

0 commit comments

Comments
 (0)