Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

Reworked app manifest #386

Reworked app manifest

Reworked app manifest #386

Workflow file for this run

name: CI
on:
push:
tags:
- 'v*.*.*'
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
checks: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: cargo-bins/cargo-binstall@main
- name: Install cargo-component
run: cargo binstall --no-confirm [email protected]
- name: Check formatting
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy -- -Dwarnings
- name: Unit Tests
run: cargo test --tests --workspace --exclude wasm-rpc-stubgen-tests-integration -- --format junit --logfile target/report.xml
- name: WASM RPC stubgen integration tests
run: cargo test --tests --package wasm-rpc-stubgen-tests-integration -- --test-threads=1 --format junit --logfile target/report.xml
- name: Build in stub mode
run: cargo component build -p golem-wasm-rpc --no-default-features --features stub
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/target/report-*.xml'
detailed_summary: true
include_passed: true
publish:
needs: [ build ]
if: "startsWith(github.ref, 'refs/tags/v')"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- id: get_version
uses: battila7/get-version-action@v2
- name: Publish crate
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
export VERSION="${{ steps.get_version.outputs.version-without-v }}"
sed -i "s/0.0.0/$VERSION/g" wasm-rpc/Cargo.toml
sed -i "s/0.0.0/$VERSION/g" wasm-rpc-stubgen/Cargo.toml
cargo publish -p golem-wasm-rpc --all-features --allow-dirty --no-verify
cargo publish -p golem-wasm-rpc-stubgen --all-features --allow-dirty --no-verify