ci(github): add #8
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: CI | |
on: [push, pull_request] | |
jobs: | |
bsd: | |
runs-on: ${{ matrix.os.host }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- name: freebsd | |
architecture: x86-64 | |
version: '14.1' | |
host: ubuntu-latest | |
- name: netbsd | |
architecture: x86-64 | |
version: '10.0' | |
host: ubuntu-latest | |
- name: openbsd | |
architecture: x86-64 | |
version: '7.5' | |
host: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Run CI script on ${{ matrix.os.name }} | |
uses: cross-platform-actions/action@v0.25.0 | |
with: | |
operating_system: ${{ matrix.os.name }} | |
architecture: ${{ matrix.os.architecture }} | |
version: ${{ matrix.os.version }} | |
shell: bash | |
run: | | |
case "$(uname)" in | |
FreeBSD) | |
sudo pkg install -y age bash socat | |
;; | |
NetBSD) | |
sudo pkgin -y install age bash socat | |
;; | |
OpenBSD) | |
sudo pkg_add -I age bash socat | |
;; | |
esac | |
./test | |
pkill -9 socat || : | |
linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y age bash socat | |
- name: Test | |
run: | | |
./test | |
mac: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
brew install age bash socat | |
- name: Test | |
run: | | |
./test |