posix: Create /proc/sys/kernel/arch #344
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
build-package: | |
strategy: | |
matrix: | |
include: | |
- pkg: managarm-kernel | |
tool_deps: >- | |
cross-binutils | |
host-llvm-toolchain | |
host-managarm-tools | |
host-protoc | |
kernel-gcc | |
system-gcc | |
pkg_deps: >- | |
mlibc | |
mlibc-headers | |
- pkg: managarm-system | |
tool_deps: >- | |
cross-binutils | |
host-autoconf-v2.69 | |
host-automake-v1.11 | |
host-automake-v1.15 | |
host-libtool | |
host-llvm-toolchain | |
host-managarm-tools | |
host-pkg-config | |
host-protoc | |
host-xorg-macros | |
system-gcc | |
pkg_deps: >- | |
boost | |
eudev | |
mlibc | |
mlibc-headers | |
protobuf | |
name: Build ${{ matrix.pkg }} | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Install prerequisites | |
run: | | |
set -x | |
sudo apt-get update | |
sudo apt-get install qemu-system-x86 | |
pip3 install xbstrap | |
xbstrap prereqs cbuildrt xbps | |
- name: Checkout bootstrap-managarm | |
uses: actions/checkout@v2 | |
with: | |
repository: managarm/bootstrap-managarm | |
path: src/ | |
- name: Checkout Managarm | |
uses: actions/checkout@v2 | |
with: | |
path: src/managarm/ | |
fetch-depth: 0 | |
- name: Download rootfs | |
run: | | |
set -x | |
curl -o rootfs.tar.gz https://repos.managarm.org/buildenv/managarm-buildenv.tar.gz | |
tar -xzf rootfs.tar.gz | |
- name: Prepare src/ and build/ | |
run: | | |
set -x | |
touch src/managarm/checkedout.xbstrap | |
mkdir build/ | |
cat << EOF > build/bootstrap-site.yml | |
define_options: | |
arch: x86_64 | |
arch-triple: x86_64-managarm | |
pkg_management: | |
format: xbps | |
container: | |
runtime: cbuildrt | |
rootfs: ../rootfs | |
uid: 1000 | |
gid: 1000 | |
src_mount: /var/lib/managarm-buildenv/src | |
build_mount: /var/lib/managarm-buildenv/build | |
allow_containerless: true | |
EOF | |
- name: Build ${{ matrix.pkg }} package | |
run: | | |
set -x | |
xbstrap init ../src | |
xbstrap download-tool-archive $CI_TOOL_DEPS | |
xbstrap pull-pack $CI_PKG_DEPS | |
xbstrap pack $CI_BUILD_PKG | |
env: | |
CI_BUILD_PKG: ${{ matrix.pkg }} | |
CI_TOOL_DEPS: ${{ matrix.tool_deps }} | |
CI_PKG_DEPS: ${{ matrix.pkg_deps }} | |
working-directory: build/ | |
- name: Generate image | |
run: | | |
set -x | |
curl -o image.xz https://builds.managarm.org/repos/files/managarm/latest/image.xz | |
unxz image.xz | |
../src/scripts/update-image.py -m loopback mount | |
# For now we need root because the mount point is owned by root | |
# and xbps uses access(mountpoint/, W_OK) to test if it can write. | |
sudo --preserve-env=XBPS_ARCH ~/.xbstrap/bin/xbps-install -fy -R xbps-repo/ -r mountpoint/ $CI_BUILD_PKG | |
../src/scripts/update-image.py unmount | |
env: | |
CI_BUILD_PKG: ${{ matrix.pkg }} | |
XBPS_ARCH: x86_64 | |
working-directory: build/ | |
- name: Test ${{ matrix.pkg }} package | |
run: | | |
../src/scripts/test-image.py | |
working-directory: build/ |