Skip to content

Commit

Permalink
Add macOS and FreeBSD CI jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
dspinellis committed Jun 24, 2024
1 parent 2d9e7b8 commit c6d4031
Showing 1 changed file with 55 additions and 1 deletion.
56 changes: 55 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- '**'

jobs:
build-and-test:
build-and-test-ubuntu:
runs-on: ubuntu-latest

steps:
Expand All @@ -32,3 +32,57 @@ jobs:

- name: Run tests
run: make test
build-and-test-macos:
runs-on: macos-latest

steps:
- name: Checkout code
uses: actions/checkout@main

- name: Install dependencies
run: |
brew install make
brew install perl
brew install openjdk
- name: Verify installations
run: |
make --version
perl --version
java -version
- name: Compile the project
run: make

- name: Run tests
run: make test

build-and-test-freebsd:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install QEMU and FreeBSD
run: |
sudo apt-get update
sudo apt-get install -y qemu-system qemu-utils
curl -O https://download.freebsd.org/ftp/releases/VM-IMAGES/13.0-RELEASE/amd64/Latest/FreeBSD-13.0-RELEASE-amd64.qcow2
qemu-img create -f qcow2 -b FreeBSD-13.0-RELEASE-amd64.qcow2 freebsd.qcow2 10G
- name: Start FreeBSD VM and build/test
run: |
sudo qemu-system-x86_64 \
-m 2G \
-hda freebsd.qcow2 \
-net user,hostfwd=tcp::2222-:22 \
-net nic \
-nographic &
sleep 60
ssh-keyscan -p 2222 localhost >> ~/.ssh/known_hosts
scp -P 2222 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -r ./* freebsd@localhost:~
ssh -p 2222 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null freebsd@localhost 'cd ~/ && sudo pkg install -y gmake perl openjdk && gmake && gmake test'
- name: Verify installations
run: ssh -p 2222 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null freebsd@localhost 'gmake --version && perl --version && java -version'

0 comments on commit c6d4031

Please sign in to comment.