github: Attempt to add a new workflow for aarch64
This commit is contained in:
parent
92ae583c5b
commit
5d89b49613
29
.github/workflows/aarch64.yml
vendored
Normal file
29
.github/workflows/aarch64.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
on: [push, workflow_dispatch]
|
||||
name: QEMU AArch64 virt
|
||||
jobs:
|
||||
build-image:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Clone Repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Clone Kuroko
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: kuroko-lang/kuroko
|
||||
path: kuroko
|
||||
- name: Checkout Kuroko
|
||||
run: git submodule update --init kuroko
|
||||
- name: Pull Builder Image
|
||||
run: docker pull toaruos/build-tools:aarch64
|
||||
- name: Run Builder
|
||||
run: docker run -v ${GITHUB_WORKSPACE}:/root/misaka -w /root/misaka -e LANG=C.UTF-8 -t toaruos/build-tools:aarch64 util/build-in-docker-aarch64.sh
|
||||
- name: Upload Branch Image
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: build
|
||||
path: |
|
||||
misaka-kernel
|
||||
ramdisk.igz
|
||||
bootstub
|
@ -1,5 +1,5 @@
|
||||
on: [push, workflow_dispatch]
|
||||
name: Build Image
|
||||
name: x86-64 CD Image
|
||||
jobs:
|
||||
build-image:
|
||||
runs-on: ubuntu-20.04
|
28
util/build-in-docker-aarch64.sh
Normal file
28
util/build-in-docker-aarch64.sh
Normal file
@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Give other users access to /root
|
||||
# (We probably should have just built the build tools somewhere else...)
|
||||
chmod o+x /root
|
||||
chmod -R o+rw /root/gcc_local/bin
|
||||
|
||||
# Who owns this directory?
|
||||
NEWUID=`stat -c '%u' .`
|
||||
|
||||
if [[ "$NEWUID" == "0" ]]; then
|
||||
echo "Are you running this on Docker for Mac? Owner UID is 0, going to use 501 instead."
|
||||
NEWUID=501
|
||||
fi
|
||||
|
||||
# Create a fake user with this name
|
||||
useradd -u $NEWUID local
|
||||
|
||||
# Map the build tools
|
||||
ln -s /root/gcc_local util/local
|
||||
|
||||
# Run make as local
|
||||
runuser -u local -- sh -c 'make ARCH=aarch64 base/lib/libc.so && make ARCH=aarch64 -j4' || exit 1
|
||||
|
||||
# Remove the build tools
|
||||
rm util/local
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user