Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,34 @@ on:
pull_request:

jobs:
build-openbsd:
runs-on: ubuntu-latest
defaults:
run:
shell: openbsd {0}
steps:
- uses: actions/checkout@v4

- name: Start OpenBSD VM
uses: vmactions/openbsd-vm@v1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this needs to be added, like #184 (comment).

(I can't vouch for this action, but I guess it should be fine to enable, even if backdoored?)

with:
prepare: |
pkg_add -v cmake ninja git python bash
run: |
git clone --depth=1 https://codeberg.org/OpenBSD/ports.git /usr/ports
sync: 'rsync'
copyback: false

- name: Install capnproto
run: |
cd /usr/ports/devel/capnproto/
make install

- name: Run CI script
run: |
cd ${{ github.workspace }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In commit "ci: Add openbsd" (98414e7)

Seems like this line might redundant according to https://github.com/vmactions/openbsd-vm "you will have the same directory". Would be nice if if it could be dropped to be simpler and consistent with the other job

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When defaults.run.shell runs, the working directory is /root, so cd ${{ github.workspace }} is still necessary.

CI_CONFIG="ci/configs/openbsd.bash" bash ci/scripts/ci.sh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In commit "ci: Add openbsd" (98414e7)

Note: It seems to be necessary to set CI_CONFIG this way instead of with env: because only github environment variables and environment variables in envs: are shared with the vm according to https://github.com/vmactions/openbsd-vm/blob/main/README.md


build:
runs-on: ubuntu-latest

Expand Down
5 changes: 5 additions & 0 deletions ci/configs/openbsd.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CI_DESC="CI config for OpenBSD"
CI_DIR=build-openbsd
export CXXFLAGS="-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter"
CMAKE_ARGS=(-G Ninja)
BUILD_ARGS=(-k 0)
Loading