-
-
Notifications
You must be signed in to change notification settings - Fork 40
137 lines (115 loc) · 5.34 KB
/
Copy pathcmake-test-release-linux.yml
File metadata and controls
137 lines (115 loc) · 5.34 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
133
134
135
136
137
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
# The official LLVM release package, installed where a custom LLVM build would be - see
# scripts/install_llvm_prebuilt_release.sh.
LLVM_FULL_VERSION: "22.1.8"
GC_VERSION: "8.2.12"
LIBATOMIC_OPS_VERSION: "7.10.0"
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@v4
# No 3rdParty cache: the LLVM prefix is about 9.6 GB, too big for the cache, and downloading it
# from GitHub each run is quick; GC is rebuilt every run anyway.
- name: Delete __Build TS folders
continue-on-error: true
run: rm -R ./__build/tslang/ninja/release
shell: sh
- name: Create __Build Folders
run: mkdir -p ./__build/tslang/ninja/release; mkdir -p ./__build/gc/ninja/release
shell: sh
# Downloads and unpacks the official LLVM package - nothing is compiled.
- name: Install 3rd party - LLVM ${{ env.LLVM_FULL_VERSION }}
continue-on-error: false
shell: sh
run: sh ./scripts/install_llvm_prebuilt_release.sh ${{ env.LLVM_FULL_VERSION }} && df -h .
- name: Download 3rd party source - GC
continue-on-error: true
shell: sh
run: curl --insecure -L https://github.com/bdwgc/bdwgc/releases/download/v${{ env.GC_VERSION }}/gc-${{ env.GC_VERSION }}.tar.gz --output gc-${{ env.GC_VERSION }}.tar.gz
- name: Download 3rd party source - GC:Atomic_ops
continue-on-error: true
shell: sh
run: curl --insecure -L https://github.com/bdwgc/libatomic_ops/releases/download/v${{ env.LIBATOMIC_OPS_VERSION }}/libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}.tar.gz --output libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}.tar.gz
- name: UnZip 3rd party source - GC
continue-on-error: false
shell: sh
run: tar -xvzf gc-${{ env.GC_VERSION }}.tar.gz -C ./3rdParty/
- name: UnZip 3rd party source - GC:Atomic_ops
continue-on-error: false
shell: sh
run: tar -xvzf libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}.tar.gz -C ./3rdParty/
- name: Copy Atomic_ops to GC
continue-on-error: false
shell: sh
run: cp -a ./3rdParty/libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}/ ./3rdParty/gc-${{ env.GC_VERSION }}/libatomic_ops/
# zlib, zstd and libxml2: the official LLVM package's CMake targets link against them.
- name: Install Ninja and LLVM's link dependencies
continue-on-error: false
shell: sh
run: sudo apt-get update && sudo apt-get install -y ninja-build zlib1g-dev libzstd-dev libxml2-dev
# - 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-${{ env.GC_VERSION }} -G "Ninja" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -Wno-dev -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/3rdParty/gc/release -DBUILD_SHARED_LIBS=OFF -Denable_threads=ON -Denable_cplusplus=OFF -Denable_docs=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: Install GC
continue-on-error: false
working-directory: ${{github.workspace}}/__build/gc/ninja/release
shell: sh
# Generates the BDWgc CMake package files (lib/cmake/bdwgc/BDWgcConfig.cmake)
# that the tslang build looks up via find_package(BDWgc CONFIG).
run: cmake --install . --config ${{ env.BUILD_TYPE }}
- 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/tslang/ninja/release
shell: sh
run: cmake ../../../../tslang -G "Ninja" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -Wno-dev
- name: Build
continue-on-error: false
working-directory: ${{github.workspace}}/__build/tslang/ninja/release
shell: sh
run: cmake --build . --config ${{ env.BUILD_TYPE }} -j 8
- name: Test
continue-on-error: false
working-directory: ${{github.workspace}}/__build/tslang/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 -j8 -C ${{ env.BUILD_TYPE }} -T test --output-on-failure -T test --output-on-failure
env:
LLVM_SYMBOLIZER_PATH: ${{github.workspace}}/3rdParty/llvm/release/bin