Skip to content

fix: host code

fix: host code #2

Workflow file for this run

name: rust
on:
merge_group:
push:
branches:
- main
pull_request:
branches:
- main
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: build rust projects
runs-on: ubuntu-latest
strategy:
matrix:
projects:
- folder: examples/example-host
- folder: examples/tutorial/adder
type: component
- folder: examples/tutorial/calculator
type: component
- folder: examples/tutorial/command
type: component
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Rust
run: rustup update stable --no-self-update
- uses: taiki-e/cache-cargo-install-action@5c9abe9a3f79d831011df7c47177debbeb320405 # v2.1.2
with:
tool: cargo-component
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
with:
shared-key: ${{ hashFiles('${{ matrix.projects.folder }}/Cargo.lock') }}
- name: Cargo bulid the package
if: ${{ matrix.projects.type !== 'component' }}

Check failure on line 50 in .github/workflows/rust.yml

View workflow run for this annotation

GitHub Actions / rust

Invalid workflow file

The workflow is not valid. .github/workflows/rust.yml (Line: 50, Col: 13): Unexpected symbol: '='. Located at position 24 within expression: matrix.projects.type !== 'component'
run: cargo build
- name: Install NPM packages
if: ${{ matrix.projects.type == 'component' }}
run: cargo component build