1 name: Cross-build Kernel
11 name: ${{ matrix.os }} (${{ matrix.compiler }})
12 runs-on: ${{ matrix.os }}
17 # TODO: both Ubuntu and macOS have bmake packages, we should try them instead of bootstrapping our own copy.
20 cross-bindir: /usr/lib/llvm-9/bin
21 pkgs: bmake libarchive-dev
24 cross-bindir: /usr/lib/llvm-10/bin
25 pkgs: bmake libarchive-dev
28 #cross-bindir: /usr/local/Cellar/llvm/11.0.0/bin # script figures this out automatically
29 pkgs: bmake libarchive llvm@11
32 - uses: actions/checkout@v2
33 - name: install packages (Ubuntu)
34 if: runner.os == 'Linux'
36 sudo apt-get update --quiet || true
37 sudo apt-get -yq --no-install-suggests --no-install-recommends install ${{ matrix.pkgs }}
38 - name: install packages (macOS)
39 if: runner.os == 'macOS'
41 brew update --quiet || true
42 brew install ${{ matrix.pkgs }}
43 - name: create environment
45 echo "GITHUB_WORKSPACE = $GITHUB_WORKSPACE"
46 if [ -n "${{ matrix.cross-bindir }}" ]; then
47 echo "EXTRA_BUILD_ARGS=--cross-bindir=${{ matrix.cross-bindir }}" >> $GITHUB_ENV
50 echo "MAKEOBJDIRPREFIX=${PWD%/*}/build" >> $GITHUB_ENV
51 # heh, works on Linux/BSD/macOS ...
52 echo "NPROC=`getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1`" >> $GITHUB_ENV
53 - name: bootstrap bmake
54 run: ./tools/build/make.py --debug $EXTRA_BUILD_ARGS TARGET=amd64 TARGET_ARCH=amd64 -n
55 - name: make kernel-toolchain
56 run: ./tools/build/make.py --debug $EXTRA_BUILD_ARGS TARGET=amd64 TARGET_ARCH=amd64 kernel-toolchain -s -j$NPROC
57 - name: make buildkernel
58 run: ./tools/build/make.py --debug $EXTRA_BUILD_ARGS TARGET=amd64 TARGET_ARCH=amd64 KERNCONF=GENERIC NO_MODULES=yes buildkernel -s -j$NPROC $EXTRA_MAKE_ARGS