Skip to content

Commit 45cc448

Browse files
committed
Added GitHub Actions jobs for BSD and Solaris.
1 parent 9987afe commit 45cc448

1 file changed

Lines changed: 189 additions & 15 deletions

File tree

.github/workflows/ci.yml

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

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

0 commit comments

Comments
 (0)