-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (40 loc) · 1.28 KB
/
ci.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
name: TEST
on: [push, pull_request]
jobs:
test:
name: ${{ matrix.os }} Ruby ${{ matrix.ruby }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu', 'macos'] # wasmer-ruby dose not work on windows...
ruby: ['3.2']
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
# bundler-cache: true <- Avoid wasmer gem installation fails.
- name: Install crystal and llvm (macos)
if: ${{ matrix.os == 'macos' }}
run: |
brew update
brew install llvm crystal
echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH
# Add the directory where wasm-ld is located to the PATH.
- name: Install crystal and lld (ubuntu)
if: ${{ matrix.os == 'ubuntu' }}
run: |
sudo apt update -y
sudo apt upgrade -y
sudo apt install lld
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
- name: Download wasm-libs
run: |
bundle install
bundle exec rake vendor:wasi_libs
- name: Install gems and run test
run: |
bundle exec ruby examples/fib_simple.rb