-
-
Notifications
You must be signed in to change notification settings - Fork 30
146 lines (122 loc) · 5.81 KB
/
cmake-test-release-win.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
name: Test - Release - Windows
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: v8
LLVM_VERSION: 19
LLVM_ZIPFILE: "https://www.dropbox.com/scl/fi/xdcj15hlzpod06x4wpls1/llvm_19_1_3_release.zip?rlkey=x38yiyfw3y6bv15z5j3oi84lb&st=bz3u5xkv&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: windows-2022
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
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.zip
key: ${{ runner.os }}-3rd-party-llvm-${{ env.LLVM_VERSION }}-release-${{ env.CACHE_VERSION }}
- name: Delete __Build TS folders
continue-on-error: true
run: if (Test-Path -Path ".\__build\tsc\msbuild\x64\release") { Remove-Item -Recurse -Force ".\__build\tsc\msbuild\x64\release" }
shell: pwsh
- name: Create __Build Folders
run: if (!(Test-Path -Path ".\__build\tsc\msbuild\x64\release")) { New-Item -ItemType Directory -Force -Path ".\__build\tsc\msbuild\x64\release" }; if (!(Test-Path -Path ".\__build\llvm\msbuild\x64\release")) { New-Item -ItemType Directory -Force -Path ".\__build\llvm\msbuild\x64\release" }; if (!(Test-Path -Path ".\__build\gc\msbuild\x64\release")) { New-Item -ItemType Directory -Force -Path ".\__build\gc\msbuild\x64\release" };
shell: pwsh
- name: Download 3rd party - LLVM
continue-on-error: true
shell: pwsh
run: if (!(Test-Path -Path "llvm_${{ env.LLVM_VERSION }}_release.zip")) { Invoke-WebRequest -SkipCertificateCheck -Uri "${{ env.LLVM_ZIPFILE }}" -OutFile "llvm_${{ env.LLVM_VERSION }}_release.zip" }
- name: UnZip 3rd party - LLVM
continue-on-error: false
run: if (Test-Path -Path "llvm_${{ env.LLVM_VERSION }}_release.zip") { Expand-Archive -Path "llvm_${{ env.LLVM_VERSION }}_release.zip" -DestinationPath "3rdParty\llvm\x64" -Force }
shell: pwsh
- name: Download 3rd party source - GC
continue-on-error: true
shell: pwsh
run: Invoke-WebRequest -SkipCertificateCheck -Uri "https://www.hboehm.info/gc/gc_source/gc-8.0.4.tar.gz" -OutFile "gc-8.0.4.tar.gz"
- name: Download 3rd party source - GC:Atomic_ops
continue-on-error: true
shell: pwsh
run: Invoke-WebRequest -SkipCertificateCheck -Uri "https://www.hboehm.info/gc/gc_source/libatomic_ops-7.6.10.tar.gz" -OutFile "libatomic_ops-7.6.10.tar.gz"
- name: UnZip 3rd party source - GC
continue-on-error: false
run: tar -xvzf gc-8.0.4.tar.gz -C ./3rdParty/
shell: pwsh
- name: UnZip 3rd party source - GC:Atomic_ops
continue-on-error: false
run: tar -xvzf libatomic_ops-7.6.10.tar.gz -C ./3rdParty/
shell: pwsh
- name: Copy Atomic_ops to GC
continue-on-error: false
run: xcopy /E /H /C /I /Y ".\3rdParty\libatomic_ops-7.6.10" ".\3rdParty\gc-8.0.4\libatomic_ops"
shell: pwsh
- name: Copy fixes to GC
continue-on-error: false
run: xcopy /E /H /C /I /Y ".\docs\fix\gc" ".\3rdParty\gc-8.0.4"
shell: pwsh
- name: Configure GC
continue-on-error: false
working-directory: ${{github.workspace}}/__build/gc/msbuild/x64/release
run: cmake ../../../../../3rdParty/gc-8.0.4 -G "Visual Studio 17 2022" -A x64 -Wno-dev -Denable_threads=ON -Denable_cplusplus=OFF
shell: pwsh
- name: Build GC
continue-on-error: false
working-directory: ${{github.workspace}}/__build/gc/msbuild/x64/release
run: cmake --build . --config ${{ env.BUILD_TYPE }} -j 8
shell: pwsh
- name: Copy GC
continue-on-error: false
working-directory: ${{github.workspace}}/__build/gc/msbuild/x64/release
run: xcopy /E /H /C /I /Y .\${{ env.BUILD_TYPE }}\ ..\..\..\..\..\3rdParty\gc\x64\release\
shell: pwsh
- name: List GC files
continue-on-error: false
working-directory: ${{github.workspace}}/3rdParty/gc/x64/release
run: dir
shell: pwsh
- name: Configure
continue-on-error: false
working-directory: ${{github.workspace}}/__build/tsc/msbuild/x64/release
run: cmake ../../../../../tsc -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -Wno-dev
shell: pwsh
- name: Build
continue-on-error: false
working-directory: ${{github.workspace}}/__build/tsc/msbuild/x64/release
run: cmake --build . --config ${{ env.BUILD_TYPE }} -j 8
shell: pwsh
- name: Test
working-directory: ${{github.workspace}}/__build/tsc/msbuild/x64/release
# 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
shell: pwsh