Skip to content

Commit 2230e88

Browse files
committed
add CI job for checking wasm
Adds a CI job for ensuring the tokio-postgres crate builds on the wasm32-unknown-unknown target without the default features.
1 parent 64bf779 commit 2230e88

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/ci.yml

+27
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,33 @@ jobs:
4747
key: clippy-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}y
4848
- run: cargo clippy --all --all-targets
4949

50+
check-wasm32:
51+
name: check-wasm32
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v3
55+
- uses: sfackler/actions/rustup@master
56+
- run: echo "version=$(rustc --version)" >> $GITHUB_OUTPUT
57+
id: rust-version
58+
- run: rustup target add wasm32-unknown-unknown
59+
- uses: actions/cache@v3
60+
with:
61+
path: ~/.cargo/registry/index
62+
key: index-${{ runner.os }}-${{ github.run_number }}
63+
restore-keys: |
64+
index-${{ runner.os }}-
65+
- run: cargo generate-lockfile
66+
- uses: actions/cache@v3
67+
with:
68+
path: ~/.cargo/registry/cache
69+
key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
70+
- run: cargo fetch
71+
- uses: actions/cache@v3
72+
with:
73+
path: target
74+
key: clippy-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}y
75+
- run: cargo check --target wasm32-unknown-unknown --manifest-path tokio-postgres/Cargo.toml --no-default-features
76+
5077
test:
5178
name: test
5279
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)