Fix build in MacOS with ruby 3.2.0 #63
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: Build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
test_linux: | |
runs-on: ubuntu-latest | |
container: | |
image: anycable/acli-dev | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v1 | |
with: | |
path: mruby | |
key: mruby3-${{ hashFiles('**/build_config.rb.lock') }} | |
restore-keys: | | |
mruby3- | |
- name: Install test deps | |
run: | | |
gem install unparser -v 0.6.4 | |
gem install childprocess ruby-next | |
- name: Test | |
run: | | |
rake nextify | |
rake host_clean | |
rake test | |
- name: Build | |
if: contains(github.ref, 'master') | |
env: | |
BUILD_TARGET: Linux-x86_64 | |
run: | | |
rake host_clean | |
rake compile | |
- name: Upload linux build | |
if: contains(github.ref, 'master') | |
uses: actions/upload-artifact@v1 | |
with: | |
name: acli-Linux-x86_64 | |
path: mruby/build/Linux-x86_64/bin/acli | |
test_macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v1 | |
with: | |
path: mruby | |
key: mruby3-${{ hashFiles('**/build_config.rb.lock') }} | |
restore-keys: | | |
mruby3- | |
- name: Install Homebrew | |
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | |
- name: Install deps | |
run: brew bundle | |
- name: Install test deps | |
run: gem install childprocess ruby-next | |
- name: Test | |
run: | | |
rake nextify | |
rake host_clean | |
rake test | |
- name: Build | |
if: contains(github.ref, 'master') | |
env: | |
BUILD_TARGET: Darwin-x86_64 | |
run: make build-macos | |
- name: Upload MacOS build | |
if: contains(github.ref, 'master') | |
uses: actions/upload-artifact@v1 | |
with: | |
name: acli-Darwin-x86_64 | |
path: mruby/build/Darwin-x86_64/bin/acli |