Skip to content

Commit

Permalink
Create Github actions (#51)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
rmalmain authored Mar 14, 2024
1 parent f282d6a commit 131dca3
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/setup_self_hosted/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Setup self-hosted GitHub runners

Instructions to set up self-hosted GitHub runners.

- Setup the desired machine.
- Create the runner by following the instructions in `Settings > Actions > Runners > New self-hosted runner`.
- Run the setup script according to your OS from this directory.
- (Optional - Linux) run `svc.sh` to make the runner work with `systemd`: `sudo ./svc.sh install && sudo ./svc.sh start`
8 changes: 8 additions & 0 deletions .github/setup_self_hosted/ubuntu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

# Should be run as root

apt -y update && apt -y upgrade
apt -y install docker.io

usermod -aG docker $USER
16 changes: 16 additions & 0 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Build and Test QEMU

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: self-hosted
container: registry.gitlab.com/qemu-project/qemu/qemu/ubuntu2204:latest
steps:
- uses: actions/checkout@v4
- name: Build QEMU
run: mkdir -p build && cd build && ../configure --enable-werror --disable-docs --enable-fdt=system && make -j $(expr $(nproc) + 1)

0 comments on commit 131dca3

Please sign in to comment.