-
Notifications
You must be signed in to change notification settings - Fork 79
54 lines (45 loc) · 1.37 KB
/
rust.yml
File metadata and controls
54 lines (45 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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:
runs-on: ubuntu-latest
strategy:
matrix:
projects:
- folder: component-model/examples/example-host
- folder: component-model/examples/tutorial/adder
type: component
- folder: component-model/examples/tutorial/calculator
type: component
- folder: component-model/examples/tutorial/command
type: component
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Rust
run: |
rustup update stable --no-self-update
rustup target add wasm32-wasip2
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
with:
shared-key: ${{ hashFiles('${{ matrix.projects.folder }}/Cargo.lock') }}
- name: Cargo build the package
working-directory: ${{ matrix.projects.folder }}
if: ${{ matrix.projects.type != 'component' }}
run: cargo build
- name: Cargo build
working-directory: ${{ matrix.projects.folder }}
if: ${{ matrix.projects.type == 'component' }}
run: cargo build