ci: remove broken cache and use prebuilt trunk binary for speed
Some checks failed
Build MIPS Binary / build (push) Failing after 1m6s
Some checks failed
Build MIPS Binary / build (push) Failing after 1m6s
This commit is contained in:
@@ -22,46 +22,7 @@ jobs:
|
|||||||
git fetch --depth=1 origin ${{ gitea.sha }}
|
git fetch --depth=1 origin ${{ gitea.sha }}
|
||||||
git checkout FETCH_HEAD
|
git checkout FETCH_HEAD
|
||||||
|
|
||||||
- name: Cache Cargo & Tools
|
|
||||||
uses: actions/cache@v3
|
|
||||||
id: cache-cargo
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/bin
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
key: ${{ runner.os }}-cargo-tools-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-cargo-tools-
|
|
||||||
|
|
||||||
- name: Cache Node.js & Zig
|
|
||||||
uses: actions/cache@v3
|
|
||||||
id: cache-tools
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.node
|
|
||||||
~/zig
|
|
||||||
key: ${{ runner.os }}-tools-node-20-zig-0.13.0
|
|
||||||
|
|
||||||
- name: Check Cache & Skip Installs
|
|
||||||
id: check-cache
|
|
||||||
run: |
|
|
||||||
if [ -d "$HOME/.node/bin" ]; then
|
|
||||||
echo "Node.js found in cache."
|
|
||||||
echo "NODE_CACHED=true" >> $GITHUB_ENV
|
|
||||||
echo "$HOME/.node/bin" >> $GITHUB_PATH
|
|
||||||
fi
|
|
||||||
if [ -d "$HOME/zig" ]; then
|
|
||||||
echo "Zig found in cache."
|
|
||||||
echo "ZIG_CACHED=true" >> $GITHUB_ENV
|
|
||||||
echo "$HOME/zig" >> $GITHUB_PATH
|
|
||||||
else
|
|
||||||
# Ensure path is added for fresh install
|
|
||||||
echo "$HOME/zig" >> $GITHUB_PATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
|
|
||||||
run: |
|
run: |
|
||||||
if ! command -v rustup >/dev/null 2>&1; then
|
if ! command -v rustup >/dev/null 2>&1; then
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||||
@@ -74,7 +35,6 @@ jobs:
|
|||||||
rustc --version
|
rustc --version
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
if: env.NODE_CACHED != 'true'
|
|
||||||
run: |
|
run: |
|
||||||
# Download and install Node.js manually to ensure correct version and PATH
|
# Download and install Node.js manually to ensure correct version and PATH
|
||||||
NODE_VER="v20.11.1"
|
NODE_VER="v20.11.1"
|
||||||
@@ -108,9 +68,16 @@ jobs:
|
|||||||
- name: Install Trunk & Tools
|
- name: Install Trunk & Tools
|
||||||
run: |
|
run: |
|
||||||
. "$HOME/.cargo/env"
|
. "$HOME/.cargo/env"
|
||||||
|
# Download pre-built trunk binary to save huge compilation time
|
||||||
|
# This replaces 'cargo install trunk'
|
||||||
|
TRUNK_VER="v0.21.5"
|
||||||
if ! command -v trunk &> /dev/null; then
|
if ! command -v trunk &> /dev/null; then
|
||||||
cargo install trunk
|
echo "Downloading trunk $TRUNK_VER..."
|
||||||
|
wget -qO- https://github.com/trunk-rs/trunk/releases/download/$TRUNK_VER/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf -
|
||||||
|
mv trunk "$HOME/.cargo/bin/"
|
||||||
|
chmod +x "$HOME/.cargo/bin/trunk"
|
||||||
fi
|
fi
|
||||||
|
trunk --version
|
||||||
|
|
||||||
# Install wasm-bindgen-cli from source because the prebuilt binary downloaded
|
# Install wasm-bindgen-cli from source because the prebuilt binary downloaded
|
||||||
# by trunk relies on a newer glibc than this runner has.
|
# by trunk relies on a newer glibc than this runner has.
|
||||||
@@ -132,7 +99,6 @@ jobs:
|
|||||||
trunk build --release
|
trunk build --release
|
||||||
|
|
||||||
- name: Setup Zig & Cross Setup
|
- name: Setup Zig & Cross Setup
|
||||||
if: env.ZIG_CACHED != 'true'
|
|
||||||
run: |
|
run: |
|
||||||
# Install Zig for cross-compilation (easier/cleaner than GCC + Cargo wrappers without Docker)
|
# Install Zig for cross-compilation (easier/cleaner than GCC + Cargo wrappers without Docker)
|
||||||
ZIG_VER="0.13.0"
|
ZIG_VER="0.13.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user