Skip to content

Commit

Permalink
chore(ci): add CI workflow for OpenBSD (aws#3754)
Browse files Browse the repository at this point in the history
  • Loading branch information
knightjoel authored Jan 13, 2023
1 parent 22aeac2 commit ae72113
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/s2n_openbsd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0
#
# or in the "license" file accompanying this file. This file is distributed
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
# express or implied. See the License for the specific language governing
# permissions and limitations under the License.
#
set -eu
export CTEST_PARALLEL_LEVEL=$(sysctl -n hw.ncpuonline)

cmake . -Brelease -GNinja -DCMAKE_BUILD_TYPE=Release
cmake --build ./release -j $CTEST_PARALLEL_LEVEL
ninja -C release test
cmake --build ./release --target clean #Saves on copy back rsync time

cmake . -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Debug
cmake --build ./build -j $CTEST_PARALLEL_LEVEL
ninja -C build test
cmake --build ./build --target clean #Saves on copy back rsync time
42 changes: 42 additions & 0 deletions .github/workflows/ci_openbsd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: OpenBSD

on:
pull_request:
branches:
- main

jobs:
testopenbsd:
runs-on: macos-12
name: CI OpenBSD
steps:
- uses: actions/checkout@v2
- name: Build and test in OpenBSD
id: test
uses: vmactions/[email protected]
with:
mem: 2048
prepare: |
# The / (root) mount point in the VM doesn't have enough disk
# space to build the project. These commands put the actual 'work'
# directory in the /home mount (which has lots of disk space) and
# creates symlinks to 'work' in the locations that the runner uses
# when copying artifacts back and forth between the VM and macOS
# host.
mv /Users/runner /home
rm -rf /Users
ln -s /home /Users
ln -sf /home/work /root/work
pkg_add ninja cmake
pkg_info
run: |
sysctl -n kern.version
.github/s2n_openbsd.sh
- name: upload test results
if: always()
uses: actions/upload-artifact@master
with:
name: all_test_output
path: |
release/testing/temporary
build/testing/temporary

0 comments on commit ae72113

Please sign in to comment.