Update ci.yml #146
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
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@v3 | |
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 |