-
Notifications
You must be signed in to change notification settings - Fork 14
70 lines (63 loc) · 2.6 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
name: Tests
on: [push, pull_request, workflow_call]
defaults:
run:
shell: bash
jobs:
test:
runs-on:
labels: 8-core-ubuntu
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: facebook/install-dotslash@latest
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
targets: x86_64-unknown-linux-gnu,aarch64-unknown-linux-gnu
- name: BTRFS-ify antlir2-out
run: |
mkdir antlir2-out
truncate -s 100G ${{ runner.temp }}/image.btrfs
mkfs.btrfs ${{ runner.temp }}/image.btrfs
sudo mount ${{ runner.temp }}/image.btrfs antlir2-out
sudo chown -R $(id -u):$(id -g) antlir2-out
- name: Install deps
run: |
sudo apt install \
cpio jq libcap-dev systemd-container
- name: Disable watchman
run: |
echo '[buck2]' >> .buckconfig
echo 'file_watcher=notify' >> .buckconfig
- name: Test target graph
run: |
./buck2 bxl //ci:test_target_graph.bxl:test_target_graph
- name: Find tests
run: |
./buck2 bxl //ci:find_tests.bxl:find_tests -- \
--disable //antlir/antlir2/antlir2_btrfs/... \
--disable //antlir/antlir2/antlir2_cas_dir:antlir2_cas_dir-image-test \
--disable //antlir/antlir2/antlir2_overlayfs/... \
--disable //antlir/antlir2/antlir2_vm:antlir2_vm-unittest \
--disable //antlir/antlir2/genrule_in_image/... \
--disable //antlir/antlir2/image_command_alias/... \
--disable //antlir/antlir2/sendstream_parser:sendstream_parser-unittest \
--disable //antlir/antlir2/test_images/cfg/os/... \
--disable //antlir/antlir2/test_images/cfg/target_arch/... \
--disable //antlir/antlir2/test_images/package/... \
--disable //antlir/antlir2/testing/tests:booted-image-test-that-should-fail \
--disable //antlir/antlir2/testing/tests:test-sh-booted-requires-units \
--disable //antlir/bzl/shape2/... \
--disable //antlir/bzl/tests/shapes/... \
--disable //antlir/rust:gen-modules-bzl-unittest \
--disable //third-party/antlir/tests:hello_world.default.test \
--disable //third-party/antlir/tests:hello_world.patched.test \
| tee ${{ runner.temp }}/tests.txt
- name: Build tests
run: |
./buck2 build --keep-going @${{ runner.temp }}/tests.txt
- name: Run tests
run: |
./buck2 test --keep-going @${{ runner.temp }}/tests.txt