-
Notifications
You must be signed in to change notification settings - Fork 21
131 lines (114 loc) · 3.39 KB
/
cmake.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
name: 'cmake'
run-name: ${{ github.event_name == 'workflow_dispatch' && github.ref_name || '' }}
# This Action is to minimally test the cmake-based build system
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
GHA_CUSTOM_LINE_PREFIX: "▌"
jobs:
emit-workflow-info:
name: Emit Workflow Info
if: ${{ github.event_name == 'workflow_dispatch' }}
runs-on: [self-hosted, Linux, X64, gcp-custom-runners]
container: 'bitnami/git:2.40.1-debian-11-r4'
steps:
- uses: actions/checkout@v3
with:
submodules: false
fetch-depth: 1
style-check:
name: Style check
runs-on: [self-hosted, Linux, X64, gcp-custom-runners]
container: bitnami/git:2.40.1-debian-11-r4
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install dependencies
run: |
apt-get update -q
apt-get install -y clang-format
build-binaries:
strategy:
matrix:
include:
- name: 'Build Binaries'
artifact-name: 'binaries'
cc: 'gcc'
cxx: 'g++'
apt-extra-deps: 'gcc g++'
build-binaries-args: ''
debian-patch: false
name: ${{ matrix.name }}
runs-on: [self-hosted, Linux, X64, gcp-custom-runners]
container: debian:bookworm
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
BUILD_BINARIES_ARGS: ${{ matrix.build-binaries-args }}
CCACHE_DIR: "${{ github.workspace }}/.cache/"
DEBIAN_FRONTEND: noninteractive
GHA_MACHINE_TYPE: "n2-highmem-8"
steps:
- uses: actions/checkout@v3
with:
submodules: false
fetch-depth: 1
- name: Set up common Debian configuration
run: |
./.github/scripts/set-up-common-debian-configuration.sh
./.github/scripts/set-up-common-git-configuration.sh
- name: Install dependencies
run: |
apt-get update -q
apt-get install -y \
ant \
bison \
build-essential \
ccache \
cmake \
default-jre \
flex \
git \
google-perftools \
libffi-dev \
libfl-dev \
libgoogle-perftools-dev \
libreadline-dev \
pkg-config \
python3 \
python3-dev \
python3-pip \
python3-orderedmultidict \
swig \
tcl-dev \
tclsh \
uuid \
uuid-dev \
wget \
${{ matrix.apt-extra-deps }} \
;
- name: Checkout submodules
run: |
git submodule sync
git submodule update --depth 1 --init --recursive --checkout \
third_party/{surelog,yosys} \
;
- name: Setup cache
uses: actions/cache@v2
with:
path: ${{ env.CCACHE_DIR }}
key: cache_${{ matrix.artifact-name }}_${{ github.run_id }}
restore-keys: cache_${{ matrix.artifact-name }}_
- name: Build binaries
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
# CMake build
make -f cmake-makefile