-
Notifications
You must be signed in to change notification settings - Fork 1
147 lines (132 loc) · 4.04 KB
/
unit-test.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
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: Build and Unit Tests
on: [push]
jobs:
build_and_unit_tests_little_endian:
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: |
sudo apt update
sudo apt install build-essential
sudo apt install cmake
sudo apt install libgtest-dev
sudo apt install clang-tidy
- name: Setup Sodium
run: |
cd $(mktemp -d)
wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.19.tar.gz -O sodium.tar.gz
tar -xzf sodium.tar.gz
cp -rp ./libsodium-stable/* .
./configure CFLAGS=-fPIC CXXFLAGS=-fPIC --enable-shared --with-pic
make && make check
sudo make install
cd -
- name: Setup JSON-C
run: |
cd $(mktemp -d)
wget https://github.com/json-c/json-c/archive/refs/tags/json-c-0.17-20230812.tar.gz -O json-c.tar.gz
tar -xzf json-c.tar.gz
cd ./json-c-json-c-0.17-20230812
cmake .
make
sudo make install
cd -
- name: Setup GMP
run: |
cd $(mktemp -d)
wget https://storage.googleapis.com/biglup/gmp-6.2.1.tar.xz -O gmp.tar.xz
tar Jxf gmp.tar.xz
cd ./gmp-6.2.1
./configure CFLAGS="-fPIC" CXXFLAGS="-fPIC" --enable-static=yes --enable-shared=no --with-pic
make -j$(nproc)
sudo make install
cd -
- name: Setup Gtest
run: |
cd $(mktemp -d)
cmake /usr/src/googletest
make
sudo make install
cd -
- name: Checkout the repository
uses: actions/checkout@v3
with:
submodules: "true"
- name: Build
run: |
./scripts/create-debug-makefiles.sh
make
- name: Run Unit Tests
run: |
make test
ctest -T Coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
build_and_unit_tests_big_endian:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: mips-unknown-linux-gnu
toolchain: stable
steps:
- name: Install Dependencies
run: |
sudo apt update
sudo apt install build-essential
sudo apt install cmake
sudo apt install libgtest-dev
sudo apt install clang-tidy
sudo apt install m4
- name: Setup Sodium
run: |
cd $(mktemp -d)
wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.19.tar.gz -O sodium.tar.gz
tar -xzf sodium.tar.gz
cp -rp ./libsodium-stable/* .
./configure CFLAGS=-fPIC CXXFLAGS=-fPIC --enable-shared --with-pic
make && make check
sudo make install
cd -
- name: Setup JSON-C
run: |
cd $(mktemp -d)
wget https://github.com/json-c/json-c/archive/refs/tags/json-c-0.17-20230812.tar.gz -O json-c.tar.gz
tar -xzf json-c.tar.gz
cd ./json-c-json-c-0.17-20230812
cmake .
make
sudo make install
cd -
- name: Setup GMP
run: |
cd $(mktemp -d)
wget https://storage.googleapis.com/biglup/gmp-6.2.1.tar.xz -O gmp.tar.xz
tar Jxf gmp.tar.xz
cd ./gmp-6.2.1
./configure CFLAGS="-fPIC" CXXFLAGS="-fPIC" --enable-static=yes --enable-shared=no --with-pic
make -j$(nproc)
sudo make install
cd -
- name: Setup Gtest
run: |
cd $(mktemp -d)
cmake /usr/src/googletest
make
sudo make install
cd -
- name: Checkout the repository
uses: actions/checkout@v3
with:
submodules: "true"
- name: Build
run: |
./scripts/create-debug-makefiles.sh
make
- name: Run Unit Tests
run: |
make test