-
Notifications
You must be signed in to change notification settings - Fork 5
73 lines (64 loc) · 1.81 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Cargo Build
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
FEDORA_LINK: https://ftp-nyc.osuosl.org/pub/fedora/linux/releases/38/Cloud/x86_64/images/Fedora-Cloud-Base-38-1.6.x86_64.qcow2
jobs:
build:
name: Rust project - latest
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v3
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: cargo build --verbose
test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: "install: mkosi + dependencies"
shell: bash
run: |
sudo apt update -o Acquire::Retries=3
sudo apt install -y dnf rpm qemu-system-x86 ovmf e2fsprogs btrfs-progs wget git \
qemu-utils genisoimage make sshpass unzip lynx bc openssl \
flex bison time util-linux
- name: "acquire: libublk"
uses: actions/checkout@v3
- name: "Cache Fedora image"
id: cache-fedora
uses: actions/cache@v3
with:
path: ~/images
key: fedora-image-key
- name: "Generate Fedora Image"
working-directory: ci
if: steps.cache-fedora.outputs.cache-hit != 'true'
run: |
pwd
ls -la
[ ! -d ~/images ] && mkdir ~/images
./setup-simple-image $FEDORA_LINK 10 ~/images
- name: "Run libublk-rs test"
shell: bash
run: ci/prep-test 10 ~/images $(pwd)
- name: Upload libublk test log
uses: actions/upload-artifact@v3
with:
name: test_log
path: |
console.log
libublk-rs.log
- name: "cleanup"
if: always()
continue-on-error: true
run: |
#cat ${{ github.workspace }}/qemu.log
sudo pkill -f qemu