-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (39 loc) · 1.35 KB
/
precompile.yml
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
on:
workflow_dispatch:
jobs:
precompile:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
attestations: write
steps:
- uses: actions/checkout@v4
- name: Precompile library
run: |
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
cd ../sqlite-wasm-rs
rustup target add wasm32-unknown-unknown
SQLITE_WASM_RS_UPDATE_PREBUILD=1 cargo build --target wasm32-unknown-unknown --features bundled,buildtime-bindgen
rm -rf ../emsdk
- name: Set commit message
id: commit_message_step
run: |
WORKFLOW_URL="https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
echo 'commit_message<<EOF' >> $GITHUB_OUTPUT
echo 'Upload precompiled library and bindings' >> $GITHUB_OUTPUT
echo $WORKFLOW_URL >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: ${{ steps.commit_message_step.outputs.commit_message }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v2
with:
subject-path: |
sqlite-wasm-rs/library/libsqlite3.a
sqlite-wasm-rs/library/libsqlite3linked.a