This repository has been archived by the owner on Sep 6, 2023. It is now read-only.
submodule: bump hosts/gossamer from c958720
to d7a90f9
#447
Workflow file for this run
This file contains 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: Conformance Testsuite | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- '.github/workflows/conformance.yml' | |
- '**' | |
- '!fixtures/genesis-default/**' | |
- '!fixtures/genesis-legacy/**' | |
- '!helpers/HostFixture.jl' | |
- '!runtimes/tester/**' | |
- '!hosts/Makefile' | |
- '!hosts/substrate' | |
- '!README.md' | |
jobs: | |
build-adapter-substrate: | |
name: "[build] substrate-adapter" | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup rust toolchain | |
run: rustup show | |
- name: Cache cargo registry and index | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: cargo-cache-adapter-substrate-${{ hashFiles('adapters/substrate/Cargo.lock') }} | |
restore-keys: cargo-cache-adapter-substrate- | |
- name: Cache cargo build ouput | |
uses: actions/cache@v3 | |
with: | |
path: adapters/substrate/target | |
key: cargo-build-adapter-substrate-${{ hashFiles('adapters/substrate/Cargo.lock') }} | |
restore-keys: cargo-build-adapter-substrate- | |
- name: Build substrate adapters | |
run: make substrate-adapter | |
- name: Upload substrate adapter | |
uses: actions/upload-artifact@v3 | |
with: | |
name: substrate-adapter | |
path: bin/substrate-adapter | |
build-adapter-kagome: | |
name: "[build] kagome-adapter" | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install gitpython | |
run: sudo apt-get install -y python3-git | |
- name: Build kagome adapter (with caching) | |
env: | |
CC: gcc-9 | |
CXX: g++-9 | |
GITHUB_HUNTER_USERNAME: ${{ secrets.HUNTER_UPLOAD_USER }} | |
GITHUB_HUNTER_TOKEN: ${{ secrets.HUNTER_UPLOAD_TOKEN }} | |
run: make kagome-adapter | |
- name: Upload kagome adapter | |
uses: actions/upload-artifact@v3 | |
with: | |
name: kagome-adapter | |
path: bin/kagome-adapter | |
build-adapter-gossamer: | |
name: "[build] gossamer-adapter" | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup go toolchain | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.18 | |
- name: Cache go modules | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: go-mod-adapter-gossamer-${{ hashFiles('adapters/gossamer/go.sum') }} | |
restore-keys: go-mod-adapter-gossamer- | |
- name: Build gossamer adapter | |
run: make gossamer-adapter | |
- name: Upload gossamer adapter | |
uses: actions/upload-artifact@v3 | |
with: | |
name: gossamer-adapter | |
path: bin/gossamer-adapter | |
- name: Upload libwasmer.so | |
uses: actions/upload-artifact@v3 | |
with: | |
name: gossamer-adapter | |
path: lib/libwasmer.so | |
build-runtime-hostapi: | |
name: "[build] hostapi-runtime" | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup rust toolchain | |
run: rustup show | |
- name: Cache cargo registry and index | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: cargo-cache-runtime-hostapi-${{ hashFiles('runtimes/hostapi/Cargo.lock') }} | |
restore-keys: cargo-cache-runtime-hostapi- | |
- name: Cache cargo build ouput | |
uses: actions/cache@v3 | |
with: | |
path: runtimes/hostapi/target | |
key: cargo-build-runtime-hostapi-${{ hashFiles('runtimes/hostapi/Cargo.lock') }} | |
restore-keys: cargo-build-runtime-hostapi- | |
- name: Build hostapi runtime | |
run: make hostapi-runtime | |
- name: Upload hostapi runtime | |
uses: actions/upload-artifact@v3 | |
with: | |
name: hostapi-runtime.default.wasm | |
path: bin/hostapi-runtime.default.wasm | |
build-runtime-hostapi-expmem: | |
name: "[build] hostapi-runtime expmem" | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup rust toolchain | |
run: rustup show | |
- name: Cache cargo registry and index | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: cargo-cache-runtime-hostapi-expmem-${{ hashFiles('runtimes/hostapi/Cargo.lock') }} | |
restore-keys: cargo-cache-runtime-hostapi-expmem- | |
- name: Cache cargo build ouput | |
uses: actions/cache@v3 | |
with: | |
path: runtimes/hostapi/target | |
key: cargo-build-runtime-hostapi-expmem-${{ hashFiles('runtimes/hostapi/Cargo.lock') }} | |
restore-keys: cargo-build-runtime-hostapi-expmem- | |
- name: Build hostapi runtime with exported memory | |
run: make hostapi-runtime-expmem | |
- name: Upload hostapi runtime with exported memory | |
uses: actions/upload-artifact@v3 | |
with: | |
name: hostapi-runtime.expmem.wasm | |
path: bin/hostapi-runtime.expmem.wasm | |
test-substrate: | |
needs: build-adapter-substrate | |
strategy: | |
fail-fast: false | |
matrix: | |
fixture: [ scale-codec, state-trie ] | |
name: "[test-${{ matrix.fixture }}] substrate" | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: substrate-adapter | |
path: bin | |
- run: chmod +x bin/substrate-adapter | |
- name: Run test fixture | |
run: ./runtests.jl substrate ${{ matrix.fixture }} | |
test-substrate-hostapi: | |
needs: [ build-adapter-substrate, build-runtime-hostapi, build-runtime-hostapi-expmem ] | |
strategy: | |
fail-fast: false | |
matrix: | |
environment: [ wasmi, wasmtime ] | |
runtime: [ default, expmem ] | |
name: "[test-host-api] substrate ${{ matrix.environment }} ${{ matrix.runtime }}" | |
runs-on: ubuntu-20.04 | |
env: | |
RUNTIME_FILE: hostapi-runtime.${{ matrix.runtime }}.wasm | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: substrate-adapter | |
path: bin | |
- uses: actions/download-artifact@v3 | |
with: | |
name: ${{ env.RUNTIME_FILE }} | |
path: bin | |
- run: chmod +x bin/substrate-adapter | |
- name: Run test fixture | |
run: ./runtests.jl substrate host-api --args --environment ${{ matrix.environment }} --runtime bin/$RUNTIME_FILE | |
test-kagome: | |
needs: [ build-adapter-substrate, build-adapter-kagome ] | |
strategy: | |
fail-fast: false | |
matrix: | |
fixture: [ scale-codec, state-trie ] | |
name: "[test-${{ matrix.fixture }}] kagome" | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: substrate-adapter | |
path: bin | |
- uses: actions/download-artifact@v3 | |
with: | |
name: kagome-adapter | |
path: bin | |
- run: cd bin && chmod +x substrate-adapter kagome-adapter | |
- name: Run test fixture | |
run: ./runtests.jl kagome ${{ matrix.fixture }} | |
test-kagome-hostapi: | |
needs: [ build-adapter-kagome, build-runtime-hostapi, build-runtime-hostapi-expmem ] | |
strategy: | |
fail-fast: false | |
matrix: | |
environment: [ binaryen, wavm ] | |
runtime: [ default, expmem ] | |
name: "[test-host-api] kagome ${{ matrix.environment }} ${{ matrix.runtime }}" | |
runs-on: ubuntu-20.04 | |
env: | |
RUNTIME_FILE: hostapi-runtime.${{ matrix.runtime }}.wasm | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: kagome-adapter | |
path: bin | |
- uses: actions/download-artifact@v3 | |
with: | |
name: ${{ env.RUNTIME_FILE }} | |
path: bin | |
- run: chmod +x bin/kagome-adapter | |
- name: Run test fixture | |
run: ./runtests.jl kagome host-api --args --environment ${{ matrix.environment }} --runtime bin/$RUNTIME_FILE | |
test-gossamer: | |
needs: [ build-adapter-substrate, build-adapter-gossamer ] | |
strategy: | |
fail-fast: false | |
matrix: | |
fixture: [ scale-codec, state-trie ] | |
name: "[test-${{ matrix.fixture }}] gossamer" | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: substrate-adapter | |
path: bin | |
- uses: actions/download-artifact@v3 | |
with: | |
name: gossamer-adapter | |
path: bin | |
- run: | | |
chmod +x bin/substrate-adapter bin/gossamer-adapter | |
mkdir -p lib | |
mv bin/libwasmer.so lib/ | |
- name: Run test fixture | |
run: ./runtests.jl gossamer ${{ matrix.fixture }} | |
test-gossamer-hostapi: | |
needs: [ build-adapter-gossamer, build-runtime-hostapi, build-runtime-hostapi-expmem ] | |
strategy: | |
fail-fast: false | |
matrix: | |
environment: [ wasmer ] | |
runtime: [ default, expmem ] | |
name: "[test-host-api] gossamer ${{ matrix.environment }} ${{ matrix.runtime }}" | |
runs-on: ubuntu-20.04 | |
env: | |
RUNTIME_FILE: hostapi-runtime.${{ matrix.runtime }}.wasm | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: gossamer-adapter | |
path: bin | |
- uses: actions/download-artifact@v3 | |
with: | |
name: ${{ env.RUNTIME_FILE }} | |
path: bin | |
- run: | | |
chmod +x bin/gossamer-adapter | |
mkdir -p lib | |
mv bin/libwasmer.so lib/ | |
- name: Run test fixture | |
run: ./runtests.jl gossamer host-api --args --environment ${{ matrix.environment }} --runtime bin/$RUNTIME_FILE |