Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ jobs:
strategy:
matrix:
clarity_version: [1, 2, 3]
name: Clarity::V${{ matrix.clarity_version }} Artifacts
cost_tracking: [false, true]

name: Clarity::V${{ matrix.clarity_version }} Artifacts${{ matrix.cost_tracking && ' (cost-tracking)' || ''}}
steps:
- name: Checkout PR
uses: actions/checkout@v4
Expand All @@ -69,21 +71,21 @@ jobs:
- name: Create archive of test binaries
run: |
cargo llvm-cov nextest-archive \
--features test-clarity-v${{ matrix.clarity_version }} \
--features test-clarity-v${{ matrix.clarity_version }}${{ matrix.cost_tracking && ',test-cost-tracking' || ''}} \
--workspace \
--archive-file nextest-archive-v${{ matrix.clarity_version }}.tar.zst
--archive-file nextest-archive-v${{ matrix.clarity_version }}-${{ matrix.cost_tracking }}.tar.zst

- name: Upload test binaries
uses: actions/upload-artifact@v4
with:
name: nextest-archive-v${{ matrix.clarity_version }}
path: nextest-archive-v${{ matrix.clarity_version }}.tar.zst
name: nextest-archive-v${{ matrix.clarity_version }}-${{ matrix.cost_tracking }}
path: nextest-archive-v${{ matrix.clarity_version }}-${{ matrix.cost_tracking }}.tar.zst
if-no-files-found: error

- name: Upload standard.wasm file
uses: actions/upload-artifact@v4
with:
name: standard-v${{ matrix.clarity_version }}.wasm
name: standard-v${{ matrix.clarity_version }}-${{ matrix.cost_tracking }}.wasm
path: ${{github.workspace}}/clar2wasm/src/standard/standard.wasm
if-no-files-found: error

Expand All @@ -96,7 +98,8 @@ jobs:
fail-fast: false
matrix:
clarity_version: [1, 2, 3]
name: Clarity::V${{ matrix.clarity_version }} Tests
cost_tracking: [false, true]
name: Clarity::V${{ matrix.clarity_version }} Tests${{ matrix.cost_tracking && ' (cost-tracking)' || ''}}
steps:
- name: Checkout PR
uses: actions/checkout@v4
Expand All @@ -113,27 +116,27 @@ jobs:
- name: Download standard.wasm file
uses: actions/download-artifact@v4
with:
name: standard-v${{ matrix.clarity_version }}.wasm
name: standard-v${{ matrix.clarity_version }}-${{ matrix.cost_tracking }}.wasm
path: ${{github.workspace}}/clar2wasm/src/standard/

- name: Download archive
uses: actions/download-artifact@v4
with:
name: nextest-archive-v${{ matrix.clarity_version }}
name: nextest-archive-v${{ matrix.clarity_version }}-${{ matrix.cost_tracking }}

- name: Run tests and output coverage
shell: bash
run: |
cargo llvm-cov nextest \
--archive-file nextest-archive-v${{ matrix.clarity_version }}.tar.zst \
--archive-file nextest-archive-v${{ matrix.clarity_version }}-${{ matrix.cost_tracking }}.tar.zst \
--codecov \
--output-path codecov-v${{ matrix.clarity_version }}.json
--output-path codecov-v${{ matrix.clarity_version }}-${{ matrix.cost_tracking }}.json

- name: Upload codecov.json
uses: actions/upload-artifact@v4
with:
name: code-coverage-v${{ matrix.clarity_version }}
path: codecov-v${{ matrix.clarity_version }}.json
name: code-coverage-v${{ matrix.clarity_version }}-${{ matrix.cost_tracking }}
path: codecov-v${{ matrix.clarity_version }}-${{ matrix.cost_tracking }}.json
if-no-files-found: error

# Code coverage
Expand Down
3 changes: 3 additions & 0 deletions clar2wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ wat = "1.0.74"
[features]
flamegraph = []
pb = []

# Test-specific features

# Clarity version to test - default v2
test-clarity-v1 = []
test-clarity-v2 = []
test-clarity-v3 = []
Expand Down
Loading
Loading