-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (112 loc) · 3.61 KB
/
run-tests.yaml
File metadata and controls
115 lines (112 loc) · 3.61 KB
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
104
105
106
107
108
109
110
111
112
113
114
115
name: Run tests
on:
push:
branch: main
pull_request:
jobs:
tests-linux:
name: Run tests (Ubuntu)
runs-on: ubuntu-24.04
steps:
- name: Check out the source repository
uses: actions/checkout@v6
with:
submodules: recursive
- name: Update APT cache
run: sudo apt-get update
- name: Install dependencies
run: >
sudo apt-get install -y
libboost-dev
libboost-json-dev
libc-ares-dev
libcap-dev
libgrpc++-dev
libmnl-dev
libncurses-dev
libprotobuf-dev
libre2-dev
libtomlplusplus-dev
pandoc
protobuf-compiler
protobuf-compiler-grpc
- name: Configure
run: |
mkdir build
cmake -G 'Ninja Multi-Config' -B build
- name: Build
id: build
run: cmake --build build --config Debug
- name: SCION++ tests
if: steps.build.conclusion == 'success'
run: timeout 5 make test
- name: Scitra tests
if: steps.build.conclusion == 'success'
run: timeout 5 make test-scitra
- name: Interposer tests
if: steps.build.conclusion == 'success'
run: timeout 5 make test-interposer
- name: Checkout SCION
uses: actions/checkout@v6
with:
repository: 'scionproto/scion'
path: 'scion'
ref: v0.14.0
- name: Set up Bazel
uses: bazel-contrib/setup-bazel@0.16.0
with:
bazelisk-version: v1.19.0
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
- name: Set up Python
uses: actions/setup-python@v6.1.0
with:
python-version: 3.12
cache: pip
- name: Install Python dependencies
working-directory: '${{ github.workspace }}/scion'
run: pip install -r tools/env/pip3/requirements.txt
- name: Install SCION dependencies
working-directory: '${{ github.workspace }}/scion'
run: cat tools/env/debian/pkgs.txt | sudo apt-get install -y $(xargs)
- name: Disable Bazel remote cache
working-directory: '${{ github.workspace }}/scion'
run: sed '/remote_cache/s/^/#/g' .bazelrc | sponge .bazelrc
- name: Build SCION
working-directory: '${{ github.workspace }}/scion'
run: |
bazel build //:scion
bazel build //:scion-topo
tar xf bazel-bin/scion.tar -C bin
tar xf bazel-bin/scion-topo.tar -C bin
- name: Run integration tests
run: make SCION_ROOT=${{ github.workspace }}/scion test-integration
# FIXME: Building gRPC with vcpkg takes a long time.
# See: https://github.com/microsoft/vcpkg/issues/43603
unit-tests-windows:
name: Run unit tests (Windows)
runs-on: windows-latest
steps:
- name: Check out the source repository
uses: actions/checkout@v6
with:
submodules: recursive
- name: Get CMake and Ninja
uses: lukka/get-cmake@latest
- name: Install dependencies with vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: a20d95d3c76906363896754eb1cc93db2a694f16
- name: Configure
uses: lukka/run-cmake@v10
with:
configurePreset: vcpkg-vs-17
- name: Build
id: build
run: cmake --build build --config Debug
- name: SCION++ tests
if: steps.build.conclusion == 'success'
run: .\build\Debug\unit-tests.exe .\tests
- name: Scitra tests
if: steps.build.conclusion == 'success'
run: .\build\scitra\Debug\scitra-tests.exe .\scitra\tests