@@ -32,14 +32,21 @@ concurrency:
3232
3333jobs :
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