Skip to content

Commit 6b1372c

Browse files
committed
Added GitHub Actions jobs for BSD and Solaris.
1 parent bebada3 commit 6b1372c

1 file changed

Lines changed: 178 additions & 15 deletions

File tree

.github/workflows/ci.yml

Lines changed: 178 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"
@@ -512,25 +542,23 @@ jobs:
512542
fi
513543
DEPINST_ARGS+=("$LIBRARY")
514544
python tools/boostdep/depinst/depinst.py "${DEPINST_ARGS[@]}"
515-
if [ -z "${{matrix.cmake_tests}}" ]
545+
rm -rf ".git"
546+
cd ..
547+
cat > b2-run-tests.sh << "EOF"
548+
#!/usr/bin/env bash
549+
set -e
550+
cd boost-root
551+
./bootstrap.sh
552+
./b2 headers
553+
if [ -n "${{matrix.compiler}}" -o -n "$GCC_TOOLCHAIN_ROOT" ]
516554
then
517-
./bootstrap.sh
518-
./b2 headers
519-
if [ -n "${{matrix.compiler}}" -o -n "$GCC_TOOLCHAIN_ROOT" ]
555+
echo -n "using ${{matrix.toolset}} : : ${{matrix.compiler}}" > ~/user-config.jam
556+
if [ -n "$GCC_TOOLCHAIN_ROOT" ]
520557
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
558+
echo -n " : <compileflags>\"--gcc-toolchain=$GCC_TOOLCHAIN_ROOT\" <linkflags>\"--gcc-toolchain=$GCC_TOOLCHAIN_ROOT\"" >> ~/user-config.jam
527559
fi
560+
echo " ;" >> ~/user-config.jam
528561
fi
529-
530-
- name: Run tests
531-
if: matrix.cmake_tests == ''
532-
run: |
533-
cd boost-root
534562
if [ -n "${{matrix.extra_tests}}" ]
535563
then
536564
export BOOST_FILESYSTEM_TEST_WITH_EXAMPLES=1
@@ -561,6 +589,141 @@ jobs:
561589
fi
562590
B2_ARGS+=("libs/$LIBRARY/test")
563591
./b2 "${B2_ARGS[@]}"
592+
EOF
593+
chmod +x b2-run-tests.sh
594+
595+
# Note: The VMs must be created after the workspace is fully prepared, as it will be copied to the VM only once
596+
- name: Setup FreeBSD VM
597+
if: matrix.vm == 'freebsd'
598+
uses: vmactions/freebsd-vm@v1
599+
with:
600+
release: "${{matrix.version}}"
601+
usesh: true
602+
sync: rsync
603+
copyback: false
604+
envs: "LIBRARY DEFAULT_BUILD_VARIANT BUILD_JOBS GCC_TOOLCHAIN_ROOT"
605+
prepare: |
606+
pkg install -y bash
607+
run: |
608+
uname -mrs
609+
sysctl hw.model
610+
sysctl hw.ncpu
611+
sysctl hw.physmem
612+
sysctl hw.usermem
613+
pwd
614+
ls -la
615+
616+
- name: Setup OpenBSD VM
617+
if: matrix.vm == 'openbsd'
618+
uses: vmactions/openbsd-vm@v1
619+
with:
620+
release: "${{matrix.version}}"
621+
usesh: true
622+
sync: rsync
623+
copyback: false
624+
envs: "LIBRARY DEFAULT_BUILD_VARIANT BUILD_JOBS GCC_TOOLCHAIN_ROOT"
625+
prepare: |
626+
pkg_add bash
627+
run: |
628+
uname -mrs
629+
sysctl hw.model
630+
sysctl hw.ncpu
631+
sysctl hw.physmem
632+
sysctl hw.usermem
633+
pwd
634+
ls -la
635+
636+
- name: Setup NetBSD VM
637+
if: matrix.vm == 'netbsd'
638+
uses: vmactions/netbsd-vm@v1
639+
with:
640+
release: "${{matrix.version}}"
641+
usesh: true
642+
sync: rsync
643+
copyback: false
644+
envs: "LIBRARY DEFAULT_BUILD_VARIANT BUILD_JOBS GCC_TOOLCHAIN_ROOT"
645+
run: |
646+
uname -mrs
647+
/sbin/sysctl hw.model
648+
/sbin/sysctl hw.ncpu
649+
/sbin/sysctl hw.physmem64
650+
/sbin/sysctl hw.usermem64
651+
pwd
652+
ls -la
653+
654+
- name: Setup DragonFlyBSD VM
655+
if: matrix.vm == 'dragonflybsd'
656+
uses: vmactions/dragonflybsd-vm@v1
657+
with:
658+
release: "${{matrix.version}}"
659+
usesh: true
660+
sync: rsync
661+
copyback: false
662+
envs: "LIBRARY DEFAULT_BUILD_VARIANT BUILD_JOBS GCC_TOOLCHAIN_ROOT"
663+
prepare: |
664+
pkg install -y bash
665+
run: |
666+
uname -mrs
667+
sysctl hw.model
668+
sysctl hw.ncpu
669+
sysctl hw.physmem
670+
sysctl hw.usermem
671+
pwd
672+
ls -la
673+
674+
- name: Setup Solaris VM
675+
if: matrix.vm == 'solaris'
676+
uses: vmactions/solaris-vm@v1
677+
with:
678+
release: "${{matrix.version}}"
679+
usesh: true
680+
sync: rsync
681+
copyback: false
682+
envs: "LIBRARY DEFAULT_BUILD_VARIANT DEFAULT_INSTRUCTION_SET BUILD_JOBS GCC_TOOLCHAIN_ROOT"
683+
run: |
684+
uname -mrs
685+
pwd
686+
ls -la
687+
688+
- name: Run tests
689+
if: matrix.cmake_tests == '' && matrix.vm == ''
690+
run: |
691+
bash ./b2-run-tests.sh
692+
693+
- name: Run tests (FreeBSD VM)
694+
if: matrix.cmake_tests == '' && matrix.vm == 'freebsd'
695+
shell: freebsd {0}
696+
run: |
697+
cd "$GITHUB_WORKSPACE"
698+
bash ./b2-run-tests.sh
699+
700+
- name: Run tests (OpenBSD VM)
701+
if: matrix.cmake_tests == '' && matrix.vm == 'openbsd'
702+
shell: openbsd {0}
703+
run: |
704+
cd "$GITHUB_WORKSPACE"
705+
bash ./b2-run-tests.sh
706+
707+
- name: Run tests (NetBSD VM)
708+
if: matrix.cmake_tests == '' && matrix.vm == 'netbsd'
709+
shell: netbsd {0}
710+
run: |
711+
cd "$GITHUB_WORKSPACE"
712+
bash ./b2-run-tests.sh
713+
714+
- name: Run tests (DragonFlyBSD VM)
715+
if: matrix.cmake_tests == '' && matrix.vm == 'dragonflybsd'
716+
shell: dragonflybsd {0}
717+
run: |
718+
cd "$GITHUB_WORKSPACE"
719+
bash ./b2-run-tests.sh
720+
721+
- name: Run tests (Solaris VM)
722+
if: matrix.cmake_tests == '' && matrix.vm == 'solaris'
723+
shell: solaris {0}
724+
run: |
725+
cd "$GITHUB_WORKSPACE"
726+
bash ./b2-run-tests.sh
564727
565728
- name: Run CMake tests
566729
if: matrix.cmake_tests

0 commit comments

Comments
 (0)