diff --git a/.gitea/workflows/next.yml b/.gitea/workflows/next.yml index 223abea6..0abdb943 100644 --- a/.gitea/workflows/next.yml +++ b/.gitea/workflows/next.yml @@ -27,15 +27,26 @@ jobs: - name: Compute wxWidgets cache key id: wx-key run: bash ci/wx-cache-key.sh - - uses: actions/cache@v4 + - id: wx-cache + uses: actions/cache/restore@v4 + continue-on-error: true with: path: /root/.cache/wx-3.3.3-linux key: ${{ steps.wx-key.outputs.key }} - name: Build wxWidgets run: | - if [ ! -x "$WX_PREFIX/bin/wx-config" ]; then + if [ ! -x "$WX_PREFIX/bin/wx-config" ] || + [ ! -s "$WX_PREFIX/lib/libwx_gtk3u-3.3.a" ]; then bash scripts/build-wx-linux.sh fi + [ -s "$WX_PREFIX/lib/libwx_gtk3u-3.3.a" ] + - name: Save vendored wxWidgets build + if: steps.wx-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + continue-on-error: true + with: + path: /root/.cache/wx-3.3.3-linux + key: ${{ steps.wx-key.outputs.key }} - name: Build release candidate run: cargo build --release -p alkane-gui -p alkane-artifacts -p alkane-flash -p alkane-cli --offline - name: Select candidate version diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index fb32997c..6c3cc36f 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -53,18 +53,30 @@ jobs: run: bash ci/wx-cache-key.sh - name: Cache vendored wxWidgets build - uses: actions/cache@v4 + id: wx-cache + uses: actions/cache/restore@v4 + continue-on-error: true with: path: /root/.cache/wx-3.3.3-linux key: ${{ steps.wx-key.outputs.key }} - name: Build wxWidgets (once, then cached) run: | - if [ ! -x "$WX_PREFIX/bin/wx-config" ]; then + if [ ! -x "$WX_PREFIX/bin/wx-config" ] || + [ ! -s "$WX_PREFIX/lib/libwx_gtk3u-3.3.a" ]; then bash scripts/build-wx-linux.sh else echo "wx prefix restored from cache" fi + [ -s "$WX_PREFIX/lib/libwx_gtk3u-3.3.a" ] + + - name: Save vendored wxWidgets build + if: steps.wx-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + continue-on-error: true + with: + path: /root/.cache/wx-3.3.3-linux + key: ${{ steps.wx-key.outputs.key }} - name: Clippy (our crate, warnings are errors) run: | diff --git a/.gitea/workflows/verify.yml b/.gitea/workflows/verify.yml index 7177cd4c..cf00b044 100644 --- a/.gitea/workflows/verify.yml +++ b/.gitea/workflows/verify.yml @@ -50,7 +50,9 @@ jobs: - name: Cache vendored wxWidgets build if: steps.surface.outputs.surface != 'documentation' - uses: actions/cache@v4 + id: wx-cache + uses: actions/cache/restore@v4 + continue-on-error: true with: path: /root/.cache/wx-3.3.3-linux key: ${{ steps.wx-key.outputs.key }} @@ -58,11 +60,21 @@ jobs: - name: Build wxWidgets (once, then cached) if: steps.surface.outputs.surface != 'documentation' run: | - if [ ! -x "$WX_PREFIX/bin/wx-config" ]; then + if [ ! -x "$WX_PREFIX/bin/wx-config" ] || + [ ! -s "$WX_PREFIX/lib/libwx_gtk3u-3.3.a" ]; then bash scripts/build-wx-linux.sh else echo "wx prefix restored from cache" fi + [ -s "$WX_PREFIX/lib/libwx_gtk3u-3.3.a" ] + + - name: Save vendored wxWidgets build + if: steps.surface.outputs.surface != 'documentation' && steps.wx-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + continue-on-error: true + with: + path: /root/.cache/wx-3.3.3-linux + key: ${{ steps.wx-key.outputs.key }} - name: Clippy (our crate, warnings are errors) if: steps.surface.outputs.surface != 'documentation'