Skip to content

Commit

Permalink
ci: add build action
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Jan 23, 2024
1 parent 1ce5d87 commit bdc262a
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build

on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.74.0
- name: Cache WASI VFS
id: cache-wasi-vfs
uses: actions/cache@v4
with:
path: /usr/local/bin/wasi-vfs
key: ${{ runner.os }}-wasi-vfs
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- uses: actions/setup-node@v4
with:
cache: yarn
- name: Install wasi-vfs
if: steps.cache-wasi-vfs.outputs.cache-hit != 'true'
run: |
curl -LO "https://github.com/kateinoigakukun/wasi-vfs/releases/download/v0.5.2/wasi-vfs-cli-x86_64-unknown-linux-gnu.zip"
unzip wasi-vfs-cli-x86_64-unknown-linux-gnu.zip
mv wasi-vfs /usr/local/bin/wasi-vfs
- name: Cache ruby.wasm artefacts
id: cache-ruby-wasm
uses: actions/cache@v4
with:
path: |
build
rubies
key: ${{ runner.os }}-ruby-wasm
- name: Build ruby.wasm
run: |
bundle exec rbwasm build -o src/ruby.wasm --ruby-version 3.2
- name: Build web app
run: |
yarn build

0 comments on commit bdc262a

Please sign in to comment.