-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (55 loc) · 1.69 KB
/
unit-tests.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
name: "unit-tests"
on:
pull_request:
push:
schedule:
# Run daily at 00:15 UTC (the 15 is to avoid periods of high load)
- cron: "15 0 * * *"
workflow_dispatch:
permissions: {}
concurrency:
group: "${{github.workflow}}-${{github.ref}}"
# Cancel in-progress jobs for efficiency
cancel-in-progress: true
jobs:
build-ystdlib-cpp:
strategy:
matrix:
os:
- "macos-latest"
- "ubuntu-20.04"
- "ubuntu-22.04"
- "ubuntu-24.04"
runs-on: "${{matrix.os}}"
steps:
- uses: "actions/checkout@v4"
with:
submodules: "recursive"
- uses: "actions/setup-python@v5"
with:
python-version: "3.11"
- name: "Install task"
shell: "bash"
run: "npm install -g @go-task/cli"
- if: "matrix.os == 'macos-latest'"
name: "Install coreutils (for md5sum)"
run: "brew install coreutils"
- if: "matrix.os == 'ubuntu-20.04'"
name: "Install gcc-10 (for c++20)"
run: |-
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
g++-10 \
gcc-10
sudo ln --symbolic --force /usr/bin/gcc-10 /usr/bin/cc
sudo ln --symbolic --force /usr/bin/g++-10 /usr/bin/c++
sudo ln --symbolic --force /usr/bin/cpp-10 /usr/bin/cpp
- name: "Log tool versions"
run: |-
command -v md5sum
command -v python
command -v tar
command -v task
# TODO: Change the task to run all unittests once any unittest is added. Until then we check
# that building the project succeeds.
- run: "task build:all"