-
-
Notifications
You must be signed in to change notification settings - Fork 32
166 lines (139 loc) · 5.69 KB
/
cmake-test-release-linux.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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
name: Test - Release - Linux
on:
# push:
# branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
schedule:
# 8:30 and 18:30 UTC:
# - cron: '30 8,18 * * *'
- cron: '30 18 * * 1'
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
CACHE_VERSION: v7
LLVM_VERSION: 17
LLVM_TARGZFILE: "https://www.dropbox.com/scl/fi/dp89m4ngxhc9wsxylo5qb/llvm_17_release.tgz?rlkey=o03vi1skezj4me9qh20rsxu93&dl=1"
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-22.04
steps:
# - name: check disk space
# run: Get-PSDrive
# shell: pwsh
- uses: actions/checkout@v2
- name: Cache Build 3rd Party
id: cache-3rd-party
uses: actions/cache@v2
with:
path: __build/llvm/ninja
key: ${{ runner.os }}-build-llvm-${{ env.LLVM_VERSION }}-${{ env.CACHE_VERSION }}
- name: Cache 3rd Party binaries
id: cache-3rd-party-binary
uses: actions/cache@v2
with:
path: 3rdParty
key: ${{ runner.os }}-3rd-party-${{ env.LLVM_VERSION }}-${{ env.CACHE_VERSION }}
- name: Cache 3rd Party binaries - LLVM ${{ env.LLVM_VERSION }} Release
id: cache-3rd-party-binary-llvm-release
uses: actions/cache@v2
with:
path: llvm_${{ env.LLVM_VERSION }}_release.tgz
key: ${{ runner.os }}-3rd-party-llvm-${{ env.LLVM_VERSION }}-release-${{ env.CACHE_VERSION }}
- name: Delete __Build TS folders
continue-on-error: true
run: rm -R ./__build/tsc/ninja/release
shell: sh
- name: Create __Build Folders
run: mkdir -p ./__build/tsc/ninja/release; mkdir -p ./__build/gc/ninja/release
shell: sh
- name: Download 3rd party - LLVM
continue-on-error: true
shell: sh
run: |
if test ! -f "llvm_${{ env.LLVM_VERSION }}_release.tgz"; then
curl --insecure -L "${{ env.LLVM_TARGZFILE }}" --output llvm_${{ env.LLVM_VERSION }}_release.tgz
fi
- name: UnZip 3rd party - LLVM
continue-on-error: false
shell: sh
run: |
if test -f "llvm_${{ env.LLVM_VERSION }}_release.tgz"; then
file llvm_${{ env.LLVM_VERSION }}_release.tgz; mkdir -p ./3rdParty/llvm; tar -xf llvm_${{ env.LLVM_VERSION }}_release.tgz -C ./3rdParty/llvm/
fi
- name: Download 3rd party source - GC
continue-on-error: true
shell: sh
run: curl --insecure -L https://www.hboehm.info/gc/gc_source/gc-8.0.4.tar.gz --output gc-8.0.4.tar.gz
- name: Download 3rd party source - GC:Atomic_ops
continue-on-error: true
shell: sh
run: curl --insecure -L https://www.hboehm.info/gc/gc_source/libatomic_ops-7.6.10.tar.gz --output libatomic_ops-7.6.10.tar.gz
- name: UnZip 3rd party source - GC
continue-on-error: false
shell: sh
run: tar -xvzf gc-8.0.4.tar.gz -C ./3rdParty/
- name: UnZip 3rd party source - GC:Atomic_ops
continue-on-error: false
shell: sh
run: tar -xvzf libatomic_ops-7.6.10.tar.gz -C ./3rdParty/
- name: Copy Atomic_ops to GC
continue-on-error: false
shell: sh
run: cp -a ./3rdParty/libatomic_ops-7.6.10/ ./3rdParty/gc-8.0.4/libatomic_ops/
- name: Copy fixes to GC
continue-on-error: false
shell: sh
run: cp -ar ./docs/fix/gc/* ./3rdParty/gc-8.0.4/
- name: Install Ninja
continue-on-error: false
shell: sh
run: sudo apt install ninja-build
# - name: Install Clang 12
# continue-on-error: false
# shell: sh
# run: sudo apt install clang-12
- name: Configure GC
continue-on-error: false
working-directory: ${{github.workspace}}/__build/gc/ninja/release
shell: sh
run: cmake ../../../../3rdParty/gc-8.0.4 -G "Ninja" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -Wno-dev -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=../../../../3rdParty/gc/release -Denable_threads=ON -Denable_cplusplus=OFF
- name: Build GC
continue-on-error: false
working-directory: ${{github.workspace}}/__build/gc/ninja/release
shell: sh
run: cmake --build . --config ${{ env.BUILD_TYPE }} -j 8
- name: Copy GC
continue-on-error: false
working-directory: ${{github.workspace}}/__build/gc/ninja/release
shell: sh
run: mkdir -p ../../../../3rdParty/gc/release/; cp ./lib* ../../../../3rdParty/gc/release/
- name: List GC files
continue-on-error: false
working-directory: ${{github.workspace}}/3rdParty/gc/release/
shell: sh
run: ls -l
- name: Configure
continue-on-error: false
working-directory: ${{github.workspace}}/__build/tsc/ninja/release
shell: sh
run: cmake ../../../../tsc -G "Ninja" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -Wno-dev
- name: Build
continue-on-error: false
working-directory: ${{github.workspace}}/__build/tsc/ninja/release
shell: sh
run: cmake --build . --config ${{ env.BUILD_TYPE }} -j 4
- name: Test
continue-on-error: false
working-directory: ${{github.workspace}}/__build/tsc/ninja/release
shell: sh
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -j1 -C ${{ env.BUILD_TYPE }} -T test --output-on-failure -T test --output-on-failure
env:
LLVM_SYMBOLIZER_PATH: ${{github.workspace}}/3rdParty/llvm/release/bin