Skip to content

Commit 56a7c9e

Browse files
committed
Added GitHub Actions jobs for BSD and Solaris.
1 parent d2666ea commit 56a7c9e

1 file changed

Lines changed: 190 additions & 15 deletions

File tree

.github/workflows/ci.yml

Lines changed: 190 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,36 @@ 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+
340+
- toolset: gcc
341+
vm: solaris
342+
version: "11.4-gcc"
343+
cxxstd64: "11,14,17,20,23,26"
344+
os: ubuntu-latest
345+
316346
- toolset: clang
317347
os: macos-14
318348
cxxstd: "11,14,17,20,2b"
@@ -334,6 +364,11 @@ jobs:
334364
steps:
335365
- name: Setup environment
336366
run: |
367+
if [ -n "${{matrix.lang}}" ]
368+
then
369+
echo "LANG=${{matrix.lang}}" >> $GITHUB_ENV
370+
export LANG=${{matrix.lang}}
371+
fi
337372
if [ -f "/etc/debian_version" ]
338373
then
339374
echo "DEBIAN_FRONTEND=noninteractive" >> $GITHUB_ENV
@@ -512,25 +547,23 @@ jobs:
512547
fi
513548
DEPINST_ARGS+=("$LIBRARY")
514549
python tools/boostdep/depinst/depinst.py "${DEPINST_ARGS[@]}"
515-
if [ -z "${{matrix.cmake_tests}}" ]
550+
rm -rf ".git"
551+
cd ..
552+
cat > b2-run-tests.sh << "EOF"
553+
#!/usr/bin/env bash
554+
set -e
555+
cd boost-root
556+
./bootstrap.sh
557+
./b2 headers
558+
if [ -n "${{matrix.compiler}}" -o -n "$GCC_TOOLCHAIN_ROOT" ]
516559
then
517-
./bootstrap.sh
518-
./b2 headers
519-
if [ -n "${{matrix.compiler}}" -o -n "$GCC_TOOLCHAIN_ROOT" ]
560+
echo -n "using ${{matrix.toolset}} : : ${{matrix.compiler}}" > ~/user-config.jam
561+
if [ -n "$GCC_TOOLCHAIN_ROOT" ]
520562
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
563+
echo -n " : <compileflags>\"--gcc-toolchain=$GCC_TOOLCHAIN_ROOT\" <linkflags>\"--gcc-toolchain=$GCC_TOOLCHAIN_ROOT\"" >> ~/user-config.jam
527564
fi
565+
echo " ;" >> ~/user-config.jam
528566
fi
529-
530-
- name: Run tests
531-
if: matrix.cmake_tests == ''
532-
run: |
533-
cd boost-root
534567
if [ -n "${{matrix.extra_tests}}" ]
535568
then
536569
export BOOST_FILESYSTEM_TEST_WITH_EXAMPLES=1
@@ -561,6 +594,148 @@ jobs:
561594
fi
562595
B2_ARGS+=("libs/$LIBRARY/test")
563596
./b2 "${B2_ARGS[@]}"
597+
EOF
598+
chmod +x b2-run-tests.sh
599+
600+
# Note: The VMs must be created after the workspace is fully prepared, as it will be copied to the VM only once
601+
- name: Setup FreeBSD VM
602+
if: matrix.vm == 'freebsd'
603+
uses: vmactions/freebsd-vm@v1
604+
with:
605+
release: "${{matrix.version}}"
606+
usesh: true
607+
sync: rsync
608+
copyback: false
609+
envs: "LANG LIBRARY DEFAULT_BUILD_VARIANT BUILD_JOBS GCC_TOOLCHAIN_ROOT"
610+
prepare: |
611+
pkg install -y bash
612+
run: |
613+
uname -mrs
614+
sysctl hw.model
615+
sysctl hw.ncpu
616+
sysctl hw.physmem
617+
sysctl hw.usermem
618+
locale
619+
pwd
620+
ls -la
621+
622+
- name: Setup OpenBSD VM
623+
if: matrix.vm == 'openbsd'
624+
uses: vmactions/openbsd-vm@v1
625+
with:
626+
release: "${{matrix.version}}"
627+
usesh: true
628+
sync: rsync
629+
copyback: false
630+
envs: "LANG LIBRARY DEFAULT_BUILD_VARIANT BUILD_JOBS GCC_TOOLCHAIN_ROOT"
631+
prepare: |
632+
pkg_add bash
633+
run: |
634+
uname -mrs
635+
sysctl hw.model
636+
sysctl hw.ncpu
637+
sysctl hw.physmem
638+
sysctl hw.usermem
639+
locale
640+
pwd
641+
ls -la
642+
643+
- name: Setup NetBSD VM
644+
if: matrix.vm == 'netbsd'
645+
uses: vmactions/netbsd-vm@v1
646+
with:
647+
release: "${{matrix.version}}"
648+
usesh: true
649+
sync: rsync
650+
copyback: false
651+
envs: "LANG LIBRARY DEFAULT_BUILD_VARIANT BUILD_JOBS GCC_TOOLCHAIN_ROOT"
652+
run: |
653+
uname -mrs
654+
/sbin/sysctl hw.model
655+
/sbin/sysctl hw.ncpu
656+
/sbin/sysctl hw.physmem64
657+
/sbin/sysctl hw.usermem64
658+
locale
659+
pwd
660+
ls -la
661+
662+
- name: Setup DragonFlyBSD VM
663+
if: matrix.vm == 'dragonflybsd'
664+
uses: vmactions/dragonflybsd-vm@v1
665+
with:
666+
release: "${{matrix.version}}"
667+
usesh: true
668+
sync: rsync
669+
copyback: false
670+
envs: "LANG LIBRARY DEFAULT_BUILD_VARIANT BUILD_JOBS GCC_TOOLCHAIN_ROOT"
671+
prepare: |
672+
pkg install -y bash
673+
run: |
674+
uname -mrs
675+
sysctl hw.model
676+
sysctl hw.ncpu
677+
sysctl hw.physmem
678+
sysctl hw.usermem
679+
locale
680+
echo "All locales:"
681+
locale -a
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)