Skip to content

Commit d32a53c

Browse files
committed
Added GitHub Actions jobs for BSD and Solaris.
1 parent 016cafb commit d32a53c

File tree

1 file changed

+190
-15
lines changed

1 file changed

+190
-15
lines changed

.github/workflows/ci.yml

Lines changed: 190 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,38 @@ jobs:
313313
- libc++-18-dev
314314
- libc++abi-18-dev
315315

316+
- toolset: clang
317+
vm: freebsd
318+
version: "14.3"
319+
cxxstd64: "11,14,17,20,23,26"
320+
os: ubuntu-latest
321+
322+
- toolset: clang
323+
vm: openbsd
324+
version: "7.7"
325+
cxxstd64: "11,14,17,20,2b"
326+
os: ubuntu-latest
327+
328+
- toolset: gcc
329+
vm: netbsd
330+
version: "10.1"
331+
cxxstd64: "11,14,17,20"
332+
os: ubuntu-latest
333+
334+
- toolset: gcc
335+
vm: dragonflybsd
336+
version: "6.4.0"
337+
cxxstd64: "11,14,17,2a"
338+
os: ubuntu-latest
339+
lang: en_US.UTF-8
340+
341+
- toolset: gcc
342+
vm: solaris
343+
version: "11.4-gcc"
344+
cxxstd64: "11,14,17,20,23,26"
345+
os: ubuntu-latest
346+
lang: en_US.UTF-8
347+
316348
- toolset: clang
317349
os: macos-14
318350
cxxstd: "11,14,17,20,2b"
@@ -334,6 +366,11 @@ jobs:
334366
steps:
335367
- name: Setup environment
336368
run: |
369+
if [ -n "${{matrix.lang}}" ]
370+
then
371+
echo "LANG=${{matrix.lang}}" >> $GITHUB_ENV
372+
export LANG=${{matrix.lang}}
373+
fi
337374
if [ -f "/etc/debian_version" ]
338375
then
339376
echo "DEBIAN_FRONTEND=noninteractive" >> $GITHUB_ENV
@@ -512,25 +549,23 @@ jobs:
512549
fi
513550
DEPINST_ARGS+=("$LIBRARY")
514551
python tools/boostdep/depinst/depinst.py "${DEPINST_ARGS[@]}"
515-
if [ -z "${{matrix.cmake_tests}}" ]
552+
rm -rf ".git"
553+
cd ..
554+
cat > b2-run-tests.sh << "EOF"
555+
#!/usr/bin/env bash
556+
set -e
557+
cd boost-root
558+
./bootstrap.sh
559+
./b2 headers
560+
if [ -n "${{matrix.compiler}}" -o -n "$GCC_TOOLCHAIN_ROOT" ]
516561
then
517-
./bootstrap.sh
518-
./b2 headers
519-
if [ -n "${{matrix.compiler}}" -o -n "$GCC_TOOLCHAIN_ROOT" ]
562+
echo -n "using ${{matrix.toolset}} : : ${{matrix.compiler}}" > ~/user-config.jam
563+
if [ -n "$GCC_TOOLCHAIN_ROOT" ]
520564
then
521-
echo -n "using ${{matrix.toolset}} : : ${{matrix.compiler}}" > ~/user-config.jam
522-
if [ -n "$GCC_TOOLCHAIN_ROOT" ]
523-
then
524-
echo -n " : <compileflags>\"--gcc-toolchain=$GCC_TOOLCHAIN_ROOT\" <linkflags>\"--gcc-toolchain=$GCC_TOOLCHAIN_ROOT\"" >> ~/user-config.jam
525-
fi
526-
echo " ;" >> ~/user-config.jam
565+
echo -n " : <compileflags>\"--gcc-toolchain=$GCC_TOOLCHAIN_ROOT\" <linkflags>\"--gcc-toolchain=$GCC_TOOLCHAIN_ROOT\"" >> ~/user-config.jam
527566
fi
567+
echo " ;" >> ~/user-config.jam
528568
fi
529-
530-
- name: Run tests
531-
if: matrix.cmake_tests == ''
532-
run: |
533-
cd boost-root
534569
if [ -n "${{matrix.extra_tests}}" ]
535570
then
536571
export BOOST_FILESYSTEM_TEST_WITH_EXAMPLES=1
@@ -561,6 +596,146 @@ jobs:
561596
fi
562597
B2_ARGS+=("libs/$LIBRARY/test")
563598
./b2 "${B2_ARGS[@]}"
599+
EOF
600+
chmod +x b2-run-tests.sh
601+
602+
# Note: The VMs must be created after the workspace is fully prepared, as it will be copied to the VM only once
603+
- name: Setup FreeBSD VM
604+
if: matrix.vm == 'freebsd'
605+
uses: vmactions/freebsd-vm@v1
606+
with:
607+
release: "${{matrix.version}}"
608+
usesh: true
609+
sync: rsync
610+
copyback: false
611+
envs: "LANG LIBRARY DEFAULT_BUILD_VARIANT BUILD_JOBS GCC_TOOLCHAIN_ROOT"
612+
prepare: |
613+
pkg install -y bash
614+
run: |
615+
uname -mrs
616+
sysctl hw.model
617+
sysctl hw.ncpu
618+
sysctl hw.physmem
619+
sysctl hw.usermem
620+
locale
621+
pwd
622+
ls -la
623+
624+
- name: Setup OpenBSD VM
625+
if: matrix.vm == 'openbsd'
626+
uses: vmactions/openbsd-vm@v1
627+
with:
628+
release: "${{matrix.version}}"
629+
usesh: true
630+
sync: rsync
631+
copyback: false
632+
envs: "LANG LIBRARY DEFAULT_BUILD_VARIANT BUILD_JOBS GCC_TOOLCHAIN_ROOT"
633+
prepare: |
634+
pkg_add bash
635+
run: |
636+
uname -mrs
637+
sysctl hw.model
638+
sysctl hw.ncpu
639+
sysctl hw.physmem
640+
sysctl hw.usermem
641+
locale
642+
pwd
643+
ls -la
644+
645+
- name: Setup NetBSD VM
646+
if: matrix.vm == 'netbsd'
647+
uses: vmactions/netbsd-vm@v1
648+
with:
649+
release: "${{matrix.version}}"
650+
usesh: true
651+
sync: rsync
652+
copyback: false
653+
envs: "LANG LIBRARY DEFAULT_BUILD_VARIANT BUILD_JOBS GCC_TOOLCHAIN_ROOT"
654+
run: |
655+
uname -mrs
656+
/sbin/sysctl hw.model
657+
/sbin/sysctl hw.ncpu
658+
/sbin/sysctl hw.physmem64
659+
/sbin/sysctl hw.usermem64
660+
locale
661+
pwd
662+
ls -la
663+
664+
- name: Setup DragonFlyBSD VM
665+
if: matrix.vm == 'dragonflybsd'
666+
uses: vmactions/dragonflybsd-vm@v1
667+
with:
668+
release: "${{matrix.version}}"
669+
usesh: true
670+
sync: rsync
671+
copyback: false
672+
envs: "LANG LIBRARY DEFAULT_BUILD_VARIANT BUILD_JOBS GCC_TOOLCHAIN_ROOT"
673+
prepare: |
674+
pkg install -y bash
675+
run: |
676+
uname -mrs
677+
sysctl hw.model
678+
sysctl hw.ncpu
679+
sysctl hw.physmem
680+
sysctl hw.usermem
681+
locale
682+
pwd
683+
ls -la
684+
685+
- name: Setup Solaris VM
686+
if: matrix.vm == 'solaris'
687+
uses: vmactions/solaris-vm@v1
688+
with:
689+
release: "${{matrix.version}}"
690+
usesh: true
691+
sync: rsync
692+
copyback: false
693+
envs: "LANG LIBRARY DEFAULT_BUILD_VARIANT BUILD_JOBS GCC_TOOLCHAIN_ROOT"
694+
run: |
695+
uname -mrs
696+
locale
697+
pwd
698+
ls -la
699+
700+
- name: Run tests
701+
if: matrix.cmake_tests == '' && matrix.vm == ''
702+
run: |
703+
bash ./b2-run-tests.sh
704+
705+
- name: Run tests (FreeBSD VM)
706+
if: matrix.cmake_tests == '' && matrix.vm == 'freebsd'
707+
shell: freebsd {0}
708+
run: |
709+
cd "$GITHUB_WORKSPACE"
710+
bash ./b2-run-tests.sh
711+
712+
- name: Run tests (OpenBSD VM)
713+
if: matrix.cmake_tests == '' && matrix.vm == 'openbsd'
714+
shell: openbsd {0}
715+
run: |
716+
cd "$GITHUB_WORKSPACE"
717+
bash ./b2-run-tests.sh
718+
719+
- name: Run tests (NetBSD VM)
720+
if: matrix.cmake_tests == '' && matrix.vm == 'netbsd'
721+
shell: netbsd {0}
722+
run: |
723+
cd "$GITHUB_WORKSPACE"
724+
bash ./b2-run-tests.sh
725+
726+
- name: Run tests (DragonFlyBSD VM)
727+
if: matrix.cmake_tests == '' && matrix.vm == 'dragonflybsd'
728+
shell: dragonflybsd {0}
729+
run: |
730+
cd "$GITHUB_WORKSPACE"
731+
bash ./b2-run-tests.sh
732+
733+
- name: Run tests (Solaris VM)
734+
if: matrix.cmake_tests == '' && matrix.vm == 'solaris'
735+
shell: solaris {0}
736+
run: |
737+
cd "$GITHUB_WORKSPACE"
738+
bash ./b2-run-tests.sh
564739
565740
- name: Run CMake tests
566741
if: matrix.cmake_tests

0 commit comments

Comments
 (0)