Skip to content

Support Iroha 2.0.0-rc.1 + move to Deno & JSR #37

Support Iroha 2.0.0-rc.1 + move to Deno & JSR

Support Iroha 2.0.0-rc.1 + move to Deno & JSR #37

Workflow file for this run

name: Pull Request CI
on:
pull_request:
branches: [main]
env:
IROHA_GIT: https://github.com/0x009922/iroha.git
IROHA_REV: 5302-expose-signature-payload
jobs:
prep-crypto-wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: prep-cache
with:
path: |
prep/crypto-wasm
key: ${{ runner.os }}-${{ hashFiles('crypto-wasm/*') }}
- uses: actions-rust-lang/setup-rust-toolchain@v1
if: steps.prep-cache.outputs.cache-hit != 'true'
with:
cache: 'false'
toolchain: 'nightly-2024-09-09,stable'
target: 'wasm32-unknown-unknown'
components: rust-src
- uses: jetli/wasm-pack-action@v0.4.0
if: steps.prep-cache.outputs.cache-hit != 'true'
with:
version: 'v0.13.1'
- uses: denoland/setup-deno@v2
if: steps.prep-cache.outputs.cache-hit != 'true'
with:
deno-version: v2.x
- name: Build packages
if: steps.prep-cache.outputs.cache-hit != 'true'
run: deno task prep:crypto-wasm
prep-iroha:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: prep-cache
with:
path: |
prep/iroha
key: ${{ runner.os }}-${{ env.IROHA_GIT }}-${{ env.IROHA_REV }}
- uses: actions-rust-lang/setup-rust-toolchain@v1
if: steps.prep-cache.outputs.cache-hit != 'true'
with:
toolchain: 'nightly-2024-09-09'
target: 'wasm32-unknown-unknown'
components: rust-src
cache: 'false'
- uses: denoland/setup-deno@v2
if: steps.prep-cache.outputs.cache-hit != 'true'
with:
deno-version: v2.x
- name: Prepare Iroha artifacts
if: steps.prep-cache.outputs.cache-hit != 'true'
run: |
deno task prep:iroha --git $IROHA_GIT --git-rev $IROHA_REV
deno task prep:iroha:build
check:
needs: ['prep-crypto-wasm', 'prep-iroha']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache/restore@v4
with:
fail-on-cache-miss: true
key: ${{ runner.os }}-${{ env.IROHA_GIT }}-${{ env.IROHA_REV }}
path: |
prep/iroha
- uses: actions/cache/restore@v4
with:
fail-on-cache-miss: true
key: ${{ runner.os }}-${{ hashFiles('crypto-wasm/*') }}
path: |
prep/crypto-wasm
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Enable corepack
run: corepack enable
- name: Deno install
run: deno task install
- name: Deno check
run: deno task check:all
- name: Deno lint, fmt
run: |
deno lint
deno fmt --check
- name: Test
run: deno task test