Remove legacy Slack references #54
Workflow file for this run
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: | |
pull_request: | |
branches: | |
- "*" | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.os }} ruby-${{ matrix.ruby }} | |
strategy: | |
matrix: | |
os: [ ubuntu-20.04, macos-11 ] | |
ruby: [ 2.5, 2.6, 2.7, 3.0, 3.1, 3.2 ] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler: default | |
bundler-cache: true | |
- name: Setup Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '1.20.5' | |
- name: Build Linux | |
if: matrix.os == 'ubuntu-20.04' | |
shell: bash | |
run: | | |
BUILD_DIR="tmp" | |
mkdir $BUILD_DIR | |
cp -R spec/support/libcobhandemo/* $BUILD_DIR | |
cd tmp | |
GOOS=linux GOARCH=amd64 go build -buildmode=c-shared -ldflags='-s -w' -o libcobhandemo-x64.so libcobhandemo.go | |
- name: Build Darwin | |
if: matrix.os == 'macos-11' | |
shell: bash | |
run: | | |
BUILD_DIR="tmp" | |
mkdir $BUILD_DIR | |
cp -R spec/support/libcobhandemo/* $BUILD_DIR | |
cd tmp | |
GOOS=darwin GOARCH=amd64 go build -buildmode=c-shared -ldflags='-s -w' -o libcobhandemo-x64.dylib libcobhandemo.go | |
- name: Run specs | |
run: | | |
COVERAGE=true bundle exec rspec spec | |
- name: Run rubocop | |
run: | | |
bundle exec rubocop | |
build_arm64: | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.os }} ruby-${{ matrix.ruby }} arm64 | |
strategy: | |
matrix: | |
include: | |
- { os: ubuntu-20.04, ruby: 3.2 } | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '1.20.5' | |
- name: Install OS dependencies | |
shell: bash | |
run: | | |
sudo apt-get update | |
sudo apt-get install gcc make gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu -y | |
- name: Build Linux ARM64 | |
shell: bash | |
run: | | |
BUILD_DIR="tmp" | |
mkdir $BUILD_DIR | |
cp -R spec/support/libcobhandemo/* $BUILD_DIR | |
cd tmp | |
CGO_ENABLED=1 GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc go build -v -buildmode=c-shared -ldflags='-s -w' -o libcobhandemo-arm64.so libcobhandemo.go | |
- name: Run specs and rubocop checks | |
shell: bash | |
run: | | |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | |
docker run --rm --volume "$(pwd):/cobhan" \ | |
--platform linux/arm64/v8 \ | |
--workdir /cobhan \ | |
ruby:${{matrix.ruby}}-bullseye \ | |
/bin/sh -c "bundle install; bundle exec rspec spec; bundle exec rubocop" |