Skip to content

Commit 131dca3

Browse files
authored
Create Github actions (#51)
* initial workflow * fix: wrong container path. * fix: build run command. * test: list directory. * test: list directory. * fix: add checkout action. * add setup scripts and instructions.
1 parent f282d6a commit 131dca3

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

.github/setup_self_hosted/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Setup self-hosted GitHub runners
2+
3+
Instructions to set up self-hosted GitHub runners.
4+
5+
- Setup the desired machine.
6+
- Create the runner by following the instructions in `Settings > Actions > Runners > New self-hosted runner`.
7+
- Run the setup script according to your OS from this directory.
8+
- (Optional - Linux) run `svc.sh` to make the runner work with `systemd`: `sudo ./svc.sh install && sudo ./svc.sh start`

.github/setup_self_hosted/ubuntu.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
# Should be run as root
4+
5+
apt -y update && apt -y upgrade
6+
apt -y install docker.io
7+
8+
usermod -aG docker $USER

.github/workflows/build_and_test.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Build and Test QEMU
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: self-hosted
12+
container: registry.gitlab.com/qemu-project/qemu/qemu/ubuntu2204:latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Build QEMU
16+
run: mkdir -p build && cd build && ../configure --enable-werror --disable-docs --enable-fdt=system && make -j $(expr $(nproc) + 1)

0 commit comments

Comments
 (0)