Try a different cache tool
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 21m56s
Details
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 21m56s
Details
This commit is contained in:
parent
dad8401212
commit
fead8487e7
|
@ -11,7 +11,6 @@ jobs:
|
||||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Install gotempl
|
- name: Install gotempl
|
||||||
run: |
|
run: |
|
||||||
mkdir -p $HOME/bin
|
mkdir -p $HOME/bin
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
FS_DIR_CACHE_ROOT="$HOME/.cache/fs-dir-cache" # directory to hold all cache (sub)directories
|
||||||
|
FS_DIR_CACHE_LOCK_ID="pid-$$-rnd-$RANDOM" # acquire lock based on the current pid and something random (just in case pid gets reused)
|
||||||
|
FS_DIR_CACHE_KEY_NAME="build-project-x" # the base name of our key
|
||||||
|
FS_DIR_CACHE_LOCK_TIMEOUT_SECS="3600" # unlock after timeout (1h) in case our job fails misereably
|
||||||
|
cargo install fs-dir-cache
|
||||||
|
|
||||||
mkdir -p app
|
mkdir -p app
|
||||||
|
|
||||||
for i in $(seq 0 $(expr $(jq '. | length' < apps.json) - 1)); do
|
for i in $(seq 0 $(expr $(jq '. | length' < apps.json) - 1)); do
|
||||||
|
@ -14,6 +20,9 @@ for i in $(seq 0 $(expr $(jq '. | length' < apps.json) - 1)); do
|
||||||
$HOME/bin/gotempl --data-json data.json< ../template/src-tauri/Cargo.toml > src-tauri/Cargo.toml
|
$HOME/bin/gotempl --data-json data.json< ../template/src-tauri/Cargo.toml > src-tauri/Cargo.toml
|
||||||
$HOME/bin/gotempl --data-json data.json< ../template/src-tauri/tauri.conf.json > src-tauri/tauri.conf.json
|
$HOME/bin/gotempl --data-json data.json< ../template/src-tauri/tauri.conf.json > src-tauri/tauri.conf.json
|
||||||
cd src-tauri
|
cd src-tauri
|
||||||
|
fs-dir-cache gc unused --seconds "$((7 * 24 * 60 * 60))" # delete caches not used in more than a week
|
||||||
|
cache_dir=$(fs-dir-cache lock --key-file Cargo.toml)
|
||||||
|
trap "fs-dir-cache unlock --dir ${cache_dir}" EXIT
|
||||||
cargo tauri build
|
cargo tauri build
|
||||||
cargo tauri build --target i686-pc-windows-msvc
|
cargo tauri build --target i686-pc-windows-msvc
|
||||||
cd ..
|
cd ..
|
||||||
|
|
Loading…
Reference in New Issue