Skip to content

protocols/hw: Remove the old PmResetRequest #433

protocols/hw: Remove the old PmResetRequest

protocols/hw: Remove the old PmResetRequest #433

Workflow file for this run

name: CI
on:
push:
pull_request:
types: [opened, edited, synchronize, reopened]
jobs:
build-package:
strategy:
matrix:
include:
- pkg: managarm-kernel
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
kernel-gcc
system-gcc
pkg_deps: >-
libdrm-headers
linux-headers
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-mold
host-pkg-config
host-xorg-macros
system-gcc
pkg_deps: >-
boost
eudev
libdrm-headers
linux-headers
mlibc
mlibc-headers
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 pcre2-utils
pip3 install xbstrap
xbstrap prereqs cbuildrt xbps
- name: Check for requested bootstrap-managarm PR
env:
PR_BODY: ${{ github.event.pull_request.body }}
run: |
pr_num=$(echo "$PR_BODY" | pcre2grep -o1 "^Depends on managarm\/bootstrap-managarm#([0-9]+)" | head -n1)
pr_ref=""
if [ ! -z "${pr_num}" ]; then
pr_ref="refs/pull/$pr_num/head"
fi
echo "bootstrap_ref=${pr_ref}" >> "$GITHUB_ENV"
- name: Checkout bootstrap-managarm
uses: actions/checkout@v2
with:
repository: managarm/bootstrap-managarm
ref: ${{env.bootstrap_ref}}
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/