[Chore] Update fork #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | |
name: wa-sqlite CI | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
env: | |
EM_VERSION: 3.1.64 | |
EM_CACHE_FOLDER: "emsdk-cache" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
- uses: browser-actions/setup-chrome@v1 | |
id: setup-chrome | |
with: | |
chrome-version: 121 | |
- run: | | |
${{ steps.setup-chrome.outputs.chrome-path }} --version | |
- name: Rust Setup | |
run: | | |
rustup toolchain install nightly-2023-08-28-x86_64-unknown-linux-gnu | |
rustup component add rust-src --toolchain nightly-2023-08-28-x86_64-unknown-linux-gnu | |
# Install yarn dependencies. | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- run: yarn install | |
- name: Rust Setup | |
run: | | |
rustup toolchain install nightly-2024-05-18-x86_64-unknown-linux-gnu | |
rustup component add rust-src --toolchain nightly-2024-05-18-x86_64-unknown-linux-gnu | |
- name: Test with checked-in WASM files | |
run: yarn test | |
# Install EMSDK | |
- name: Setup Emscripten | |
id: cache-system-libraries | |
uses: actions/cache@v4 | |
with: | |
path: ${{env.EM_CACHE_FOLDER}} | |
key: ${{env.EM_VERSION}}-${{ runner.os }} | |
- uses: mymindstorm/setup-emsdk@v12 | |
with: | |
version: ${{env.EM_VERSION}} | |
actions-cache-folder: ${{env.EM_CACHE_FOLDER}} | |
- run: emcc -v | |
- name: Test WASM build | |
run: | | |
make clean && make | |
yarn test |