Skip to content

Commit 5fd5e1b

Browse files
committed
ci: move BSD jobs to dedicated bsd-ci.yml workflow
- FreeBSD x86-64 runs on PR/push (slow tests disabled via AWS_LC_NO_SLOW_TESTS) - FreeBSD arm64, OpenBSD, NetBSD run on daily schedule (08:00 UTC) - Removes BSD jobs from actions-ci.yml to avoid triggering full workflow on schedule
1 parent cf95ba0 commit 5fd5e1b

3 files changed

Lines changed: 174 additions & 134 deletions

File tree

.github/workflows/actions-ci.yml

Lines changed: 0 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -562,61 +562,6 @@ jobs:
562562
- name: Run tests
563563
run: cmake --build ./build --target run_tests
564564

565-
OpenBSD:
566-
needs: [sanity-test-run]
567-
runs-on: ubuntu-latest
568-
name: OpenBSD ${{ matrix.version }} (${{ matrix.arch }}) test
569-
strategy:
570-
fail-fast: false
571-
matrix:
572-
arch: ["x86-64", "arm64"]
573-
version: ["7.5", "7.6"]
574-
steps:
575-
- uses: actions/checkout@v6
576-
- name: OpenBSD
577-
uses: cross-platform-actions/action@2d97d42e1972a17b045fd709a422f7e55a86230d
578-
env:
579-
AWS_LC_GO_TEST_TIMEOUT: 120m
580-
with:
581-
environment_variables: AWS_LC_GO_TEST_TIMEOUT
582-
operating_system: openbsd
583-
cpu_count: 3
584-
memory: 12G
585-
architecture: ${{ matrix.arch }}
586-
version: "${{ matrix.version }}"
587-
shell: bash
588-
run: |
589-
set -x
590-
sudo pkg_add cmake ninja go gmake
591-
sudo pfctl -d
592-
mkdir "${HOME}/bin"
593-
ln -s /usr/local/bin/gmake "${HOME}/bin/make"
594-
cat << EOF | sudo tee /etc/login.conf.d/unlimited
595-
unlimited:\
596-
:datasize-cur=infinity:\
597-
:datasize-max=infinity:\
598-
:stacksize-cur=infinity:\
599-
:stacksize-max=infinity:\
600-
:memoryuse-cur=infinity:\
601-
:memoryuse-max=infinity:\
602-
:maxproc-cur=infinity:\
603-
:maxproc-max=infinity:\
604-
:openfiles-cur=infinity:\
605-
:openfiles-max=infinity:\
606-
:cpuuse-cur=infinity:\
607-
:cpuuse-max=infinity:\
608-
:priority=0:\
609-
:ignoretime:
610-
EOF
611-
sudo usermod -L unlimited runner
612-
sudo su -c unlimited -s /usr/local/bin/bash -l runner <<EOF
613-
set -x
614-
export AWS_LC_GO_TEST_TIMEOUT=${AWS_LC_GO_TEST_TIMEOUT}
615-
cd $(pwd)
616-
export PATH="${HOME}/bin:${PATH}"
617-
env
618-
tests/ci/run_bsd_tests.sh
619-
EOF
620565
gcc-4_8:
621566
needs: [sanity-test-run]
622567
runs-on: ubuntu-latest
@@ -689,81 +634,3 @@ jobs:
689634
# echo ${env:SDEROOT}
690635
# .\tests\ci\run_windows_tests.bat "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 true
691636
#
692-
freebsd:
693-
if: github.repository_owner == 'aws'
694-
needs: [sanity-test-run]
695-
name: FreeBSD ${{ matrix.version }} (${{ matrix.arch }}) test
696-
runs-on: ubuntu-latest
697-
strategy:
698-
fail-fast: false
699-
matrix:
700-
arch:
701-
- "x86-64"
702-
- "arm64"
703-
version:
704-
- "14.2"
705-
- "15.0"
706-
steps:
707-
- uses: actions/checkout@v6
708-
with:
709-
submodules: "recursive"
710-
- name: Prepare VM
711-
uses: cross-platform-actions/action@v0.32.0
712-
env:
713-
AWS_LC_GO_TEST_TIMEOUT: 90m
714-
AWS_LC_SSL_RUNNER_IDLE_TIMEOUT: 120s
715-
AWS_LC_SSL_RUNNER_RETRY_ON_TIMEOUT: 1
716-
GOFLAGS: "-buildvcs=false"
717-
with:
718-
environment_variables: "AWS_LC_GO_TEST_TIMEOUT AWS_LC_SSL_RUNNER_IDLE_TIMEOUT AWS_LC_SSL_RUNNER_RETRY_ON_TIMEOUT GOFLAGS"
719-
operating_system: freebsd
720-
architecture: ${{ matrix.arch }}
721-
version: ${{ matrix.version }}
722-
shell: bash
723-
memory: 12G
724-
cpu_count: 3
725-
run: |
726-
sudo pkg install -y git gmake cmake go ninja
727-
tests/ci/run_bsd_tests.sh
728-
netbsd:
729-
if: github.repository_owner == 'aws'
730-
needs: [sanity-test-run]
731-
name: NetBSD ${{ matrix.version }} (${{ matrix.arch }}) test
732-
runs-on: ubuntu-latest
733-
strategy:
734-
fail-fast: false
735-
matrix:
736-
arch:
737-
- "x86-64"
738-
- "arm64"
739-
version:
740-
- "10.1"
741-
steps:
742-
- uses: actions/checkout@v6
743-
with:
744-
submodules: "recursive"
745-
- name: Prepare VM
746-
uses: cross-platform-actions/action@2d97d42e1972a17b045fd709a422f7e55a86230d
747-
env:
748-
AWS_LC_GO_TEST_TIMEOUT: 90m
749-
GOFLAGS: "-buildvcs=false"
750-
with:
751-
environment_variables: "AWS_LC_GO_TEST_TIMEOUT GOFLAGS"
752-
operating_system: netbsd
753-
architecture: ${{ matrix.arch }}
754-
version: ${{ matrix.version }}
755-
shell: bash
756-
memory: 12G
757-
cpu_count: 3
758-
run: |
759-
set -x
760-
export PKG_PATH="https://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/${{ (matrix.arch == 'arm64' && 'aarch64') || 'x86_64' }}/${{ matrix.version }}/All"
761-
sudo -E pkg_add -u curl cmake gmake perl mozilla-rootcerts
762-
ARCH=${{ (matrix.arch == 'x86-64' && 'amd') || 'arm' }}
763-
export PATH="/usr/pkg/bin:/usr/pkg/sbin:/usr/sbin:/usr/bin:/sbin:/bin"
764-
curl -O https://dl.google.com/go/go1.25.2.netbsd-${ARCH}64.tar.gz
765-
sudo mkdir -p /usr/local
766-
sudo tar -C /usr/local -xzf go1.25.2.netbsd-${ARCH}64.tar.gz
767-
export GOROOT=/usr/local/go
768-
export PATH="$PATH:$GOROOT/bin"
769-
tests/ci/run_bsd_tests.sh

.github/workflows/bsd-ci.yml

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
name: BSD CI Tests
2+
on:
3+
push:
4+
branches: ["*"]
5+
pull_request:
6+
branches: ["*"]
7+
schedule:
8+
- cron: '0 8 * * *'
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref_name }}
11+
cancel-in-progress: true
12+
env:
13+
GOPROXY: https://proxy.golang.org,direct
14+
PACKAGE_NAME: aws-lc
15+
16+
permissions:
17+
contents: read
18+
19+
# BSD CI Strategy:
20+
# - FreeBSD x86-64: scheduled(daily) + on every PR(with slow tests disabled)
21+
# - FreeBSD arm64: schedule only (daily)
22+
# - OpenBSD: schedule only (daily)
23+
# - NetBSD: schedule only (daily)
24+
# Full test suite (including slow tests) runs on the daily schedule.
25+
26+
jobs:
27+
freebsd:
28+
if: github.repository_owner == 'aws'
29+
runs-on: ubuntu-latest
30+
name: FreeBSD ${{ matrix.version }} (${{ matrix.arch }}) test
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
arch:
35+
- "x86-64"
36+
version:
37+
- "14.2"
38+
- "15.0"
39+
include: ${{ github.event_name == 'schedule' && fromJSON('[{"arch":"arm64","version":"14.2"},{"arch":"arm64","version":"15.0"}]') || fromJSON('[]') }}
40+
steps:
41+
- uses: actions/checkout@v6
42+
with:
43+
submodules: "recursive"
44+
- name: Prepare VM
45+
uses: cross-platform-actions/action@v0.32.0
46+
env:
47+
AWS_LC_GO_TEST_TIMEOUT: 90m
48+
AWS_LC_SSL_RUNNER_IDLE_TIMEOUT: 120s
49+
AWS_LC_SSL_RUNNER_RETRY_ON_TIMEOUT: 1
50+
AWS_LC_NO_SLOW_TESTS: ${{ github.event_name != 'schedule' && '1' || '0' }}
51+
GOFLAGS: "-buildvcs=false"
52+
with:
53+
environment_variables: "AWS_LC_GO_TEST_TIMEOUT AWS_LC_SSL_RUNNER_IDLE_TIMEOUT AWS_LC_SSL_RUNNER_RETRY_ON_TIMEOUT AWS_LC_NO_SLOW_TESTS GOFLAGS"
54+
operating_system: freebsd
55+
architecture: ${{ matrix.arch }}
56+
version: ${{ matrix.version }}
57+
shell: bash
58+
memory: 12G
59+
cpu_count: 3
60+
run: |
61+
sudo pkg install -y git gmake cmake go ninja
62+
tests/ci/run_bsd_tests.sh
63+
64+
OpenBSD:
65+
if: github.event_name == 'schedule'
66+
runs-on: ubuntu-latest
67+
name: OpenBSD ${{ matrix.version }} (${{ matrix.arch }}) test
68+
strategy:
69+
fail-fast: false
70+
matrix:
71+
arch: ["x86-64", "arm64"]
72+
version: ["7.5", "7.6"]
73+
steps:
74+
- uses: actions/checkout@v6
75+
- name: OpenBSD
76+
uses: cross-platform-actions/action@2d97d42e1972a17b045fd709a422f7e55a86230d
77+
env:
78+
AWS_LC_GO_TEST_TIMEOUT: 120m
79+
with:
80+
environment_variables: AWS_LC_GO_TEST_TIMEOUT
81+
operating_system: openbsd
82+
cpu_count: 3
83+
memory: 12G
84+
architecture: ${{ matrix.arch }}
85+
version: "${{ matrix.version }}"
86+
shell: bash
87+
run: |
88+
set -x
89+
sudo pkg_add cmake ninja go gmake
90+
sudo pfctl -d
91+
mkdir "${HOME}/bin"
92+
ln -s /usr/local/bin/gmake "${HOME}/bin/make"
93+
cat << EOF | sudo tee /etc/login.conf.d/unlimited
94+
unlimited:\
95+
:datasize-cur=infinity:\
96+
:datasize-max=infinity:\
97+
:stacksize-cur=infinity:\
98+
:stacksize-max=infinity:\
99+
:memoryuse-cur=infinity:\
100+
:memoryuse-max=infinity:\
101+
:maxproc-cur=infinity:\
102+
:maxproc-max=infinity:\
103+
:openfiles-cur=infinity:\
104+
:openfiles-max=infinity:\
105+
:cpuuse-cur=infinity:\
106+
:cpuuse-max=infinity:\
107+
:priority=0:\
108+
:ignoretime:
109+
EOF
110+
sudo usermod -L unlimited runner
111+
sudo su -c unlimited -s /usr/local/bin/bash -l runner <<EOF
112+
set -x
113+
export AWS_LC_GO_TEST_TIMEOUT=${AWS_LC_GO_TEST_TIMEOUT}
114+
cd $(pwd)
115+
export PATH="${HOME}/bin:${PATH}"
116+
env
117+
tests/ci/run_bsd_tests.sh
118+
EOF
119+
120+
netbsd:
121+
if: github.repository_owner == 'aws' && github.event_name == 'schedule'
122+
runs-on: ubuntu-latest
123+
name: NetBSD ${{ matrix.version }} (${{ matrix.arch }}) test
124+
strategy:
125+
fail-fast: false
126+
matrix:
127+
arch:
128+
- "x86-64"
129+
- "arm64"
130+
version:
131+
- "10.1"
132+
steps:
133+
- uses: actions/checkout@v6
134+
with:
135+
submodules: "recursive"
136+
- name: Prepare VM
137+
uses: cross-platform-actions/action@2d97d42e1972a17b045fd709a422f7e55a86230d
138+
env:
139+
AWS_LC_GO_TEST_TIMEOUT: 90m
140+
GOFLAGS: "-buildvcs=false"
141+
with:
142+
environment_variables: "AWS_LC_GO_TEST_TIMEOUT GOFLAGS"
143+
operating_system: netbsd
144+
architecture: ${{ matrix.arch }}
145+
version: ${{ matrix.version }}
146+
shell: bash
147+
memory: 12G
148+
cpu_count: 3
149+
run: |
150+
set -x
151+
export PKG_PATH="https://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/${{ (matrix.arch == 'arm64' && 'aarch64') || 'x86_64' }}/${{ matrix.version }}/All"
152+
sudo -E pkg_add -u curl cmake gmake perl mozilla-rootcerts
153+
ARCH=${{ (matrix.arch == 'x86-64' && 'amd') || 'arm' }}
154+
export PATH="/usr/pkg/bin:/usr/pkg/sbin:/usr/sbin:/usr/bin:/sbin:/bin"
155+
curl -O https://dl.google.com/go/go1.25.2.netbsd-${ARCH}64.tar.gz
156+
sudo mkdir -p /usr/local
157+
sudo tar -C /usr/local -xzf go1.25.2.netbsd-${ARCH}64.tar.gz
158+
export GOROOT=/usr/local/go
159+
export PATH="$PATH:$GOROOT/bin"
160+
tests/ci/run_bsd_tests.sh

tests/ci/run_bsd_tests.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ set -ex
66

77
source tests/ci/common_posix_setup.sh
88

9+
# AWS_LC_NO_SLOW_TESTS: when set to "1", reduces test scope on all platforms.
10+
# - ARM64: skips disabled (slow) tests
11+
# - x86-64: skips FIPS build configurations
12+
913
if [ "$PLATFORM" != "amd64" ] && [ "$PLATFORM" != "x86_64" ]; then
1014
# ARM64 platforms are tested via emulation.
1115
# We narrow testing to libcrypto to avoid exceeding 1 hour duration
@@ -15,7 +19,11 @@ if [ "$PLATFORM" != "amd64" ] && [ "$PLATFORM" != "x86_64" ]; then
1519

1620
run_build all
1721

18-
shard_gtest "${BUILD_ROOT}/crypto/crypto_test --gtest_also_run_disabled_tests"
22+
if [[ "${AWS_LC_NO_SLOW_TESTS:-0}" == "0" ]]; then
23+
shard_gtest "${BUILD_ROOT}/crypto/crypto_test --gtest_also_run_disabled_tests"
24+
else
25+
shard_gtest ${BUILD_ROOT}/crypto/crypto_test
26+
fi
1927
shard_gtest ${BUILD_ROOT}/crypto/urandom_test
2028
shard_gtest ${BUILD_ROOT}/crypto/mem_test
2129
shard_gtest ${BUILD_ROOT}/crypto/mem_set_test
@@ -40,6 +48,11 @@ build_and_test -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1
4048
echo "Testing AWS-LC static library in release mode."
4149
build_and_test -DCMAKE_BUILD_TYPE=Release
4250

51+
if [[ "${AWS_LC_NO_SLOW_TESTS:-0}" != "0" ]]; then
52+
echo "AWS_LC_NO_SLOW_TESTS is set, skipping FIPS builds."
53+
exit 0
54+
fi
55+
4356
# The FIPS builds fail on NetBSD
4457
if [[ "$KERNEL_NAME" != "NetBSD" ]]; then
4558
echo "Testing AWS-LC shared library in FIPS Release mode."

0 commit comments

Comments
 (0)