-
Notifications
You must be signed in to change notification settings - Fork 2
133 lines (105 loc) · 3.54 KB
/
c-cpp.yml
File metadata and controls
133 lines (105 loc) · 3.54 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: C/C++ CI
on:
push:
branches: [ "master" ]
# pull_request:
# branches: [ "master" ]
jobs:
build-gcc:
runs-on: ubuntu-latest
# only one compiler build at same time, so no weird cache behaviour happens
concurrency:
group: build-gcc
cancel-in-progress: false
steps:
- uses: actions/checkout@v6
# TODO: skip if cache hit
- name: install apt packages
run: sudo apt update && sudo apt install g++-14 bzip2 flex build-essential
- uses: webfactory/ssh-agent@v0.10.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: get gcc commit
id: get-gcc-commit
run: |
echo "commit=$(git rev-parse HEAD:submodules/gcc)" >> $GITHUB_OUTPUT
shell: bash
- name: cache gcc install
id: cache-gcc
uses: actions/cache@v5
with:
path: /opt/GCC
key: ${{ runner.os }}-gcc-${{ steps.get-gcc-commit.outputs.commit }}
- name: install gcc
run: |
git submodule update --init --depth=1 -- submodules/gcc
submodules/build-gcc.sh --install
if: steps.cache-gcc.outputs.cache-hit != 'true'
build:
needs: build-gcc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
# - name: install apt packages
# run: sudo apt update && sudo apt install g++-14 nlohmann-json3-dev bzip2 flex build-essential
- uses: webfactory/ssh-agent@v0.10.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: fetch nlohmann json
run: |
git submodule update --init --depth=1 -- submodules/nlohmann-json
- name: get gcc commit
id: get-gcc-commit
run: |
echo "commit=$(git rev-parse HEAD:submodules/gcc)" >> $GITHUB_OUTPUT
shell: bash
- name: restore gcc install
uses: actions/cache/restore@v5
id: cache-gcc
with:
path: /opt/GCC
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
fail-on-cache-miss: true
- name: activate gcc
run: |
echo "/opt/GCC/bin" >> $GITHUB_PATH
echo "LD_RUN_PATH=/opt/GCC/lib64" >> $GITHUB_ENV
- name: validate gcc
run: echo | g++ -xc++ -E --verbose -
- name: build
run: CXXVER=26 ./build.py /build_system /linux /process /algos /meta /utility /stl /reflection /parsing
- name: test
run: ./run_built_tests.py
build2:
needs: build-gcc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
# - name: install apt packages
# run: sudo apt update && sudo apt install g++-14 nlohmann-json3-dev bzip2 flex build-essential
- uses: webfactory/ssh-agent@v0.10.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: fetch nlohmann json
run: |
git submodule update --init --depth=1 -- submodules/nlohmann-json
- name: get gcc commit
id: get-gcc-commit
run: |
echo "commit=$(git rev-parse HEAD:submodules/gcc)" >> $GITHUB_OUTPUT
shell: bash
- name: restore gcc install
uses: actions/cache/restore@v5
id: cache-gcc
with:
path: /opt/GCC
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
fail-on-cache-miss: true
- name: activate gcc
run: |
echo "/opt/GCC/bin" >> $GITHUB_PATH
echo "LD_RUN_PATH=/opt/GCC/lib64" >> $GITHUB_ENV
- name: validate gcc
run: echo | g++ -xc++ -E --verbose -
- name: build2
run: ./bootstrap.sh /ivl/build_system /ivl/linux /ivl/process /ivl/algos /ivl/meta /ivl/utility /ivl/stl /ivl/reflection /ivl/parsing