Skip to content

Commit 6ed8a46

Browse files
committed
make github-actions work again (dependency updates, some caching)
1 parent 77546a9 commit 6ed8a46

1 file changed

Lines changed: 122 additions & 59 deletions

File tree

.github/workflows/checks.yml

Lines changed: 122 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,150 @@
1-
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
4-
name: Wasp-HLS PR check
1+
name: CI
52

63
on:
74
push:
85
branches: [stable, dev, legacy-v3]
96
pull_request:
10-
types: [opened, synchronize, reopened]
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
16+
env:
17+
CARGO_TERM_COLOR: always
18+
WASM_BINDGEN_CLI_VERSION: 0.2.120
1119

1220
jobs:
1321
format_check:
22+
name: Format check
1423
runs-on: ubuntu-latest
15-
16-
strategy:
17-
matrix:
18-
node-version: [20.x]
19-
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
24+
timeout-minutes: 15
2025

2126
steps:
22-
- uses: actions/checkout@v2
23-
- name: Use Node.js ${{ matrix.node-version }}
24-
uses: actions/setup-node@v2
25-
with:
26-
node-version: ${{ matrix.node-version }}
27-
cache: "npm"
28-
- uses: actions-rs/toolchain@v1
27+
- uses: actions/checkout@v5
28+
29+
- name: Set up Node.js
30+
uses: actions/setup-node@v6
2931
with:
30-
toolchain: stable
32+
node-version: 24
33+
cache: npm
3134

32-
- run: npm install
33-
- run: rustup component add rustfmt
34-
- run: npm run fmt:check
35-
- run: npm run fmt:check
35+
- name: Set up Rust
36+
run: rustup component add rustfmt
3637

37-
typechecking_and_linting:
38-
runs-on: ubuntu-latest
38+
- name: Install dependencies
39+
run: npm ci
3940

40-
strategy:
41-
matrix:
42-
node-version: [20.x]
43-
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
41+
- name: Check formatting
42+
run: npm run fmt:check
43+
44+
code_quality:
45+
name: Typecheck, lint, clippy, and debug build
46+
runs-on: ubuntu-latest
47+
timeout-minutes: 30
4448

4549
steps:
46-
- uses: actions/checkout@v2
47-
- name: Use Node.js ${{ matrix.node-version }}
48-
uses: actions/setup-node@v2
50+
- uses: actions/checkout@v5
51+
52+
- name: Set up Node.js
53+
uses: actions/setup-node@v6
54+
with:
55+
node-version: 24
56+
cache: npm
57+
58+
- name: Set up Rust
59+
run: |
60+
rustup target add wasm32-unknown-unknown
61+
rustup component add clippy
62+
63+
- name: Cache cargo registry
64+
uses: actions/cache@v4
4965
with:
50-
node-version: ${{ matrix.node-version }}
51-
cache: "npm"
52-
- uses: actions-rs/toolchain@v1
66+
path: |
67+
~/.cargo/registry
68+
~/.cargo/git
69+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
70+
restore-keys: |
71+
${{ runner.os }}-cargo-registry-
72+
73+
- name: Cache cargo binaries
74+
uses: actions/cache@v4
5375
with:
54-
toolchain: stable
76+
path: ~/.cargo/bin
77+
key: ${{ runner.os }}-cargo-bin-wasm-bindgen-${{ env.WASM_BINDGEN_CLI_VERSION }}
5578

56-
- run: npm install
57-
- run: rustup target add wasm32-unknown-unknown
58-
- run: rustup component add clippy
59-
- run: cargo install wasm-bindgen-cli@0.2.93
60-
- run: npm run build:all
61-
- run: npm run check
62-
- run: npm run clippy
79+
- name: Cache Rust target
80+
uses: actions/cache@v4
81+
with:
82+
path: target
83+
key: ${{ runner.os }}-target-quality-${{ hashFiles('**/Cargo.lock') }}
84+
restore-keys: |
85+
${{ runner.os }}-target-quality-
86+
87+
- name: Install wasm-bindgen-cli
88+
run: cargo install wasm-bindgen-cli --version ${{ env.WASM_BINDGEN_CLI_VERSION }} --locked
89+
90+
- name: Install dependencies
91+
run: npm ci
92+
93+
- name: Build debug artifacts
94+
run: npm run build:all
95+
96+
- name: Typecheck and lint
97+
run: npm run check
98+
99+
- name: Run clippy
100+
run: npm run clippy
63101

64102
release_build:
103+
name: Release build
65104
runs-on: ubuntu-latest
66-
67-
strategy:
68-
matrix:
69-
node-version: [20.x]
70-
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
105+
timeout-minutes: 30
71106

72107
steps:
73-
- uses: actions/checkout@v2
74-
- name: Use Node.js ${{ matrix.node-version }}
75-
uses: actions/setup-node@v2
108+
- uses: actions/checkout@v5
109+
110+
- name: Set up Node.js
111+
uses: actions/setup-node@v6
76112
with:
77-
node-version: ${{ matrix.node-version }}
78-
cache: "npm"
79-
- uses: actions-rs/toolchain@v1
113+
node-version: 24
114+
cache: npm
115+
116+
- name: Set up Rust
117+
run: rustup target add wasm32-unknown-unknown
118+
119+
- name: Cache cargo registry
120+
uses: actions/cache@v4
121+
with:
122+
path: |
123+
~/.cargo/registry
124+
~/.cargo/git
125+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
126+
restore-keys: |
127+
${{ runner.os }}-cargo-registry-
128+
129+
- name: Cache cargo binaries
130+
uses: actions/cache@v4
80131
with:
81-
toolchain: stable
132+
path: ~/.cargo/bin
133+
key: ${{ runner.os }}-cargo-bin-wasm-bindgen-${{ env.WASM_BINDGEN_CLI_VERSION }}
134+
135+
- name: Cache Rust target
136+
uses: actions/cache@v4
137+
with:
138+
path: target
139+
key: ${{ runner.os }}-target-release-${{ hashFiles('**/Cargo.lock') }}
140+
restore-keys: |
141+
${{ runner.os }}-target-release-
142+
143+
- name: Install wasm-bindgen-cli
144+
run: cargo install wasm-bindgen-cli --version ${{ env.WASM_BINDGEN_CLI_VERSION }} --locked
145+
146+
- name: Install dependencies
147+
run: npm ci
82148

83-
- run: npm install
84-
- run: rustup target add wasm32-unknown-unknown
85-
- run: rustup component add clippy
86-
- run: cargo install wasm-bindgen-cli@0.2.93
87-
- run: npm run build:release
149+
- name: Build release artifacts
150+
run: npm run build:release

0 commit comments

Comments
 (0)