@@ -23,12 +23,19 @@ concurrency:
2323jobs :
2424 lint :
2525 runs-on : ubuntu-latest
26+ env :
27+ CARGO_TARGET_DIR : /tmp/cargo-target
2628
2729 steps :
2830 - uses : actions/checkout@v6
2931 with :
3032 fetch-depth : 0
33+ - name : Prepare cargo target dir
34+ run : rm -rf "$CARGO_TARGET_DIR"
3135 - uses : Swatinem/rust-cache@v2
36+ - name : Remove stale rusty_v8 checksums
37+ shell : bash
38+ run : ./scripts/fix-rusty-v8-cache.sh target
3239 - uses : dtolnay/rust-toolchain@stable
3340 with :
3441 components : rustfmt, clippy
6673 runs-on : ${{ matrix.os }}
6774 steps :
6875 - uses : actions/checkout@v6
76+ - name : Configure cargo target dir (Linux)
77+ if : runner.os == 'Linux'
78+ run : |
79+ echo "CARGO_TARGET_DIR=/tmp/cargo-target" >> "$GITHUB_ENV"
80+ rm -rf /tmp/cargo-target
6981 - name : Clear up some disk space from the runner
7082 if : ${{ runner.os != 'Windows' }}
7183 run : |
99111 with :
100112 key : ${{ matrix.target }}
101113 save-if : ${{ github.ref == 'refs/heads/main' }}
114+ - name : Remove stale rusty_v8 checksums
115+ shell : bash
116+ run : ./scripts/fix-rusty-v8-cache.sh target
102117 - name : Build
103118 run : cargo build --target ${{ matrix.target }} --workspace --exclude postgres-resolver-dynamic --exclude postgres-builder-dynamic --exclude server-cf-worker
104119 - name : Run tests
@@ -109,10 +124,24 @@ jobs:
109124 env :
110125 RUST_BACKTRACE : 1
111126 EXO_RUN_INTROSPECTION_TESTS : true
112- run : target/${{ matrix.target }}/debug/exo test integration-tests
127+ run : |
128+ BIN_DIR="${CARGO_TARGET_DIR:-target}"
129+ EXO_BIN="${BIN_DIR}/${{ matrix.target }}/debug/exo"
130+ if [ "$RUNNER_OS" = "Windows" ]; then
131+ EXO_BIN="${EXO_BIN}.exe"
132+ fi
133+ "$EXO_BIN" test integration-tests
113134 shell : bash
114135 - name : Error reporting tests
115- run : cd error-report-testing && npm install && EXO_EXECUTABLE=${PWD}/../target/${{matrix.target}}/debug/exo npm run dev
136+ run : |
137+ BIN_DIR="${CARGO_TARGET_DIR:-target}"
138+ EXO_BIN="${BIN_DIR}/${{ matrix.target }}/debug/exo"
139+ if [ "$RUNNER_OS" = "Windows" ]; then
140+ EXO_BIN="${EXO_BIN}.exe"
141+ fi
142+ cd error-report-testing
143+ npm install
144+ EXO_EXECUTABLE="${EXO_BIN}" npm run dev
116145 shell : bash
117146
118147 test-wasm :
0 commit comments