Skip to content

Commit

Permalink
cleanup examples.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lwshang committed Oct 9, 2024
1 parent ef6dd04 commit 9c1416b
Showing 1 changed file with 5 additions and 45 deletions.
50 changes: 5 additions & 45 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
ic-wasm-version: 0.4.0

jobs:
build-candid-extractor:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
candid-extractor/target/
key: ${{ runner.os }}-candid-extractor-${{ hashFiles('candid-extractor/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-candid-extractor-
${{ runner.os }}-
- name: Build candid-extractor
run: cd candid-extractor && cargo build -p candid-extractor --release

- uses: actions/upload-artifact@v4
with:
name: candid-extractor
path: candid-extractor/target/release/candid-extractor

test:
runs-on: ubuntu-latest
needs: build-candid-extractor
strategy:
fail-fast: false
matrix:
Expand All @@ -72,22 +40,14 @@ jobs:
restore-keys: |
${{ runner.os }}-
- name: Install ic-wasm
# might already in cache
run: |
wget https://github.com/dfinity/ic-wasm/releases/download/${{env.ic-wasm-version }}/ic-wasm-linux64
chmod 755 ic-wasm-linux64
mv ic-wasm-linux64 /usr/local/bin/ic-wasm
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@main

- name: Download candid-extractor
uses: actions/download-artifact@v4
with:
name: candid-extractor
- name: Install ic-wasm
uses: cargo binstall ic-wasm

- name: Install candid-extractor
run: |
chmod 755 candid-extractor
mv candid-extractor /usr/local/bin/candid-extractor
run: cargo binstall candid-extractor

- name: Install DFX
uses: dfinity/setup-dfx@main
Expand Down

0 comments on commit 9c1416b

Please sign in to comment.