feat: introduce v8 locker in our codebase #1417
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- ready_for_review | |
push: | |
branches: | |
- main | |
- develop | |
workflow_dispatch: | |
permissions: | |
contents: read | |
env: | |
CARGO_INCREMENTAL: 0 | |
CARGO_NET_RETRY: 10 | |
CARGO_TERM_COLOR: always | |
RUSTUP_MAX_RETRIES: 10 | |
ORT_DYLIB_PATH: /tmp/onnxruntime/lib/libonnxruntime.so | |
RUST_LOG: ext_event_worker=trace | |
ESZIP_TESTDATA_REPO: supabase/edge-runtime-test-eszip | |
jobs: | |
cargo-fmt: | |
if: github.event.pull_request.draft == false | |
name: 'fmt' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v2 | |
with: | |
deno-version: v2.x | |
- run: rustup show | |
- run: deno run --allow-write --allow-read --allow-run --allow-net ./scripts/format.js --check | |
cargo-clippy: | |
if: github.event.pull_request.draft == false | |
name: 'cargo clippy' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install deps | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install libblas-dev liblapack-dev libopenblas-dev | |
- run: rustup show | |
- uses: Swatinem/rust-cache@v2 | |
- run: ./scripts/clippy.sh | |
cargo-test: | |
if: github.event.pull_request.draft == false | |
name: 'cargo test' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install deps | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install libblas-dev liblapack-dev libopenblas-dev | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Remove unwanted software | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /usr/local/lib/android | |
sudo rm -rf /opt/ghc | |
sudo rm -rf /opt/hostedtoolcache/CodeQL | |
sudo docker image prune --all --force | |
sudo apt-get remove --purge -y man-db | |
sudo apt-get remove 'clang-13*' 'clang-14*' 'clang-15*' 'llvm-13*' 'llvm-14*' 'llvm-15*' 'lld-13*' 'lld-14*' 'lld-15*' | |
- uses: actions/checkout@v4 | |
- run: rustup show | |
- uses: Swatinem/rust-cache@v2 | |
- uses: cardinalby/export-env-action@v2 | |
with: | |
envFile: '.env' | |
- name: Install ONNX Runtime Library | |
run: ./scripts/install_onnx.sh "${{ env.ONNXRUNTIME_VERSION }}" linux x64 /tmp/onnxruntime | |
- name: Prepare test eszip binaries | |
if: | | |
github.actor != 'dependabot[bot]' && | |
( | |
github.event_name != 'pull_request' | |
|| github.event.pull_request.head.repo.full_name == github.repository | |
) | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ env.ESZIP_TESTDATA_REPO }} | |
path: ./edge-runtime-test-eszip | |
token: ${{ secrets.EDGE_RUNTIME_ORG_TOKEN }} | |
- name: Decompress test eszip binaries | |
if: | | |
github.actor != 'dependabot[bot]' && | |
( | |
github.event_name != 'pull_request' | |
|| github.event.pull_request.head.repo.full_name == github.repository | |
) | |
run: | | |
mkdir -p crates/base/tests/fixture/testdata | |
./scripts/esbr.cjs decompress ./edge-runtime-test-eszip/testdata | |
mv ./edge-runtime-test-eszip/testdata/*.out crates/base/tests/fixture/testdata | |
- name: Install Supabase Storage S3 credentials for testing | |
if: | | |
github.actor != 'dependabot[bot]' && | |
( | |
github.event_name != 'pull_request' | |
|| github.event.pull_request.head.repo.full_name == github.repository | |
) | |
run: | | |
cd crates/fs/tests | |
echo "S3FS_TEST_SUPABASE_STORAGE=true" >> .env | |
echo "S3FS_TEST_APP_NAME=edge_runtime_github_ci" >> .env | |
echo "S3FS_TEST_BUCKET_NAME=$BUCKET_NAME" >> .env | |
echo "S3FS_TEST_ENDPOINT_URL=$ENDPOINT_URL" >> .env | |
echo "S3FS_TEST_REGION=$REGION" >> .env | |
echo "S3FS_TEST_ACCESS_KEY_ID=$ACCESS_KEY_ID" >> .env | |
echo "S3FS_TEST_SECRET_ACCESS_KEY=$SECRET_ACCESS_KEY" >> .env | |
shell: bash | |
env: | |
BUCKET_NAME: ${{ secrets.SUPABASE_S3_BUCKET_NAME }} | |
ENDPOINT_URL: ${{ secrets.SUPABASE_S3_ENTRYPOINT }} | |
REGION: ${{ secrets.SUPABASE_S3_REGION }} | |
ACCESS_KEY_ID: ${{ secrets.SUPABASE_S3_ACCESS_KEY }} | |
SECRET_ACCESS_KEY: ${{ secrets.SUPABASE_S3_SECRET }} | |
- name: Generate code coverage | |
id: coverage | |
run: | | |
cargo llvm-cov test --workspace --no-fail-fast --lcov -j 1 --output-path lcov.info | |
- name: Coveralls upload | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: lcov.info | |
debug: true |