forked from nullpo-head/wsl-distrod
-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (89 loc) · 2.36 KB
/
ci.yaml
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
unit-test-on-linux:
name: Unit test on Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
distrod/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run tests
run: |
make unit-test-linux
integration-test-on-linux:
name: Integration test on Linux
runs-on: ubuntu-latest
strategy:
matrix:
distro-to-test:
- ubuntu
- debian
- archlinux
- fedora
- centos
- almalinux
- rockylinux
- kali
- mint
- opensuse
- amazonlinux
- oracle
- gentoo
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
distrod/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/cache@v2
with:
path: |
~/.distrod_integration_test/image_cache/**/*.tar.xz
key: ${{ runner.os }}-test-images-v2
- name: Install dnsutils
run: |
sudo apt-get update
sudo apt-get install -y dnsutils
- name: Run tests
run: |
export DISTROD_IMAGE_CACHE_DIR="${HOME}/.distrod_integration_test/image_cache" \
export DISTROD_INSTALL_DIR="${HOME}/.distrod_integration_test/install" \
export DISTRO_TO_TEST="${{ matrix.distro-to-test }}"
make integration-test-linux
test-on-windows:
name: CI on Windows
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
distrod/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run tests
run: |
touch distrod/distrod_wsl_launcher/resources/distrod_root.tar.gz # dummy file
make -f windows.mk test-win