test arm64 debian #144
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, pull_request] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.2.3 | |
- name: Set up environment | |
run: bundle install | |
- name: Build | |
run: bundle exec rake package | |
- name: Show standalone packages | |
run: ls pkg | |
- name: Upload standalone packages | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pkg | |
path: pkg | |
test: | |
defaults: | |
run: | |
shell: sh | |
needs: [build] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["windows-latest","ubuntu-latest","macos-12"] | |
arch: ["amd64"] | |
alpine: [false] | |
include: | |
- os: "macos-14" | |
arch: "arm64" | |
- os: "ubuntu-latest" | |
arch: "arm64" | |
alpine: true | |
docker: true | |
- os: "ubuntu-latest" | |
arch: "amd64" | |
alpine: true | |
docker: true | |
- os: "ubuntu-latest" | |
arch: "arm64" | |
debian: true | |
docker: true | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up QEMU | |
if: matrix.arch == 'arm64' && matrix.docker == true | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
if: matrix.arch == 'arm64' && matrix.docker == true | |
uses: docker/setup-buildx-action@v3 | |
- name: Download all workflow run artifacts | |
uses: actions/download-artifact@v3 | |
- name: test ${{ matrix.os }} package | |
if: ${{ matrix.alpine == false }} | |
run: ./script/unpack-and-test.sh | |
- name: test alpine ${{ matrix.arch }} package | |
if: ${{ matrix.alpine == true }} | |
run: docker run --platform=linux/${{ matrix.arch }} --rm -v $(pwd):/app alpine /bin/sh -c 'apk add --no-cache bash && cd /app && ./script/unpack-and-test.sh' | |
- name: test alpine ${{ matrix.arch }} package | |
if: ${{ matrix.debian == true }} | |
run: docker run --platform=linux/${{ matrix.arch }} --rm -v $(pwd):/app debian /bin/bash -c 'cd /app && ./script/unpack-and-test.sh' | |
- name: test x86 package | |
if: ${{ runner.os == 'Windows'}} | |
run: ./script/unpack-and-test.sh | |
env: | |
BINARY_OS: 'windows' | |
BINARY_ARCH: 'x86' |