Skip to content

Commit f44de6e

Browse files
committed
ci: add integration tests for aarch64
Signed-off-by: Sergio Lopez <[email protected]>
1 parent 06cf357 commit f44de6e

File tree

6 files changed

+75
-126
lines changed

6 files changed

+75
-126
lines changed

.cirrus.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/code_quality-aarch64-darwin.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/code_quality-x86_64.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Code Quality (rustfmt and clippy)
2+
on: [pull_request, create]
3+
4+
jobs:
5+
build:
6+
if: github.event_name == 'pull_request'
7+
name: Integration Tests (aarch64)
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Code checkout
11+
uses: actions/checkout@v2
12+
- name: Install Rust toolchain (${{ matrix.rust }})
13+
uses: actions-rs/toolchain@v1
14+
with:
15+
toolchain: stable
16+
target: aarch64-unknown-linux-musl
17+
components: rustfmt, clippy
18+
19+
- name: Enable KVM group perms
20+
run: |
21+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
22+
sudo udevadm control --reload-rules
23+
sudo udevadm trigger --name-match=kvm
24+
sudo usermod -a -G kvm $USER
25+
26+
- name: Install packages
27+
run: sudo apt-get update && sudo apt-get install -y build-essential patchelf libclang-dev pkg-config net-tools libvirglrenderer-dev libepoxy-dev libdrm-dev libpipewire-0.3-dev
28+
29+
- name: Install libkrunfw
30+
run: curl -L -o /tmp/libkrunfw-4.9.0-aarch64.tgz https://github.com/containers/libkrunfw/releases/download/v4.9.0/libkrunfw-4.9.0-aarch64.tgz && tar xf /tmp/libkrunfw-4.9.0-aarch64.tgz -C /tmp && mv /tmp/lib64/* /lib/aarch64-linux-gnu
31+
32+
- name: Integration tests
33+
run: make test

.github/workflows/code_quality-aarch64.yml renamed to .github/workflows/integration_tests-macos.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ on: [pull_request, create]
44
jobs:
55
build:
66
if: github.event_name == 'pull_request'
7-
name: Code Quality (clippy, rustfmt)
8-
runs-on: ubuntu-latest
7+
name: Integration Tests (aarch64)
8+
runs-on: macos-latest
99
strategy:
1010
matrix:
1111
rust:
1212
- stable
1313
target:
14-
- aarch64-unknown-linux-gnu
14+
- aarch64-apple-darwin
1515
steps:
1616
- name: Code checkout
1717
uses: actions/checkout@v2
@@ -23,17 +23,12 @@ jobs:
2323
override: true
2424
components: rustfmt, clippy
2525

26-
- name: Install packages
27-
run: sudo apt-get update && sudo apt-get install -y libvirglrenderer-dev libepoxy-dev libdrm-dev libpipewire-0.3-dev
26+
- name: Set up Homebrew
27+
id: set-up-homebrew
28+
uses: Homebrew/actions/setup-homebrew@master
2829

29-
- name: Create a fake init
30-
run: touch init/init
30+
- name: Install dependencies
31+
run: brew tap slp/krunkit && brew install virglrenderer
3132

3233
- name: Formatting (rustfmt)
33-
run: cargo fmt -- --check
34-
35-
- name: Clippy (default features)
36-
run: cargo clippy -- -D warnings
37-
38-
- name: Clippy (net+blk+gpu+snd features)
39-
run: cargo clippy --features net,blk,gpu,snd -- -D warnings
34+
run: cargo clippy --features efi,gpu
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Code Quality (rustfmt and clippy)
2+
on: [pull_request, create]
3+
4+
jobs:
5+
build:
6+
if: github.event_name == 'pull_request'
7+
name: Integration Tests (x86_64)
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Code checkout
11+
uses: actions/checkout@v2
12+
- name: Install Rust toolchain (${{ matrix.rust }})
13+
uses: actions-rs/toolchain@v1
14+
with:
15+
toolchain: stable
16+
target: x86_64-unknown-linux-musl
17+
components: rustfmt, clippy
18+
19+
- name: Enable KVM group perms
20+
run: |
21+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
22+
sudo udevadm control --reload-rules
23+
sudo udevadm trigger --name-match=kvm
24+
sudo usermod -a -G kvm $USER
25+
26+
- name: Install packages
27+
run: sudo apt-get update && sudo apt-get install -y build-essential patchelf libclang-dev pkg-config net-tools libvirglrenderer-dev libepoxy-dev libdrm-dev libpipewire-0.3-dev
28+
29+
- name: Install libkrunfw
30+
run: curl -L -o /tmp/libkrunfw-4.9.0-x86_64.tgz https://github.com/containers/libkrunfw/releases/download/v4.9.0/libkrunfw-4.9.0-x86_64.tgz && tar xf /tmp/libkrunfw-4.9.0-x86_64.tgz -C /tmp && mv /tmp/lib64/* /lib/x86_64-linux-gnu
31+
32+
- name: Integration tests
33+
run: make test

0 commit comments

Comments
 (0)