-
-
Notifications
You must be signed in to change notification settings - Fork 125
160 lines (148 loc) · 5.58 KB
/
Copy pathbuild-win-compiler+runtime.yml
File metadata and controls
160 lines (148 loc) · 5.58 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: Build compiler+runtime (MS-Windows)
on:
pull_request:
paths:
- 'compiler\+runtime/**'
push:
branches:
- main
paths:
- 'compiler\+runtime/**'
workflow_dispatch:
permissions:
contents: read
# Only allow one build per branch at a time. New builds will cancel existing builds.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# Rather than having every job in the matrix try to build its own Clang, we built it once
# before running the matrix. Then we can just restore it from the cache in each job.
windows-build-clang:
name: Windows MSYS2 - clang
runs-on: windows-2022
timeout-minutes: 200
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Cache Clang/LLVM
id: clang-cache
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
with:
path: |
${{ github.workspace }}/compiler+runtime/build/llvm-install
key: clang-${{ runner.os }}-${{ hashFiles('compiler+runtime/bin/build-clang') }}
- uses: msys2/setup-msys2@v2
if: steps.clang-cache.outputs.cache-hit != 'true'
with:
msystem: CLANG64
install: base-devel git mingw-w64-clang-x86_64-clang mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-ninja mingw-w64-clang-x86_64-pkgconf mingw-w64-clang-x86_64-libunwind mingw-w64-clang-x86_64-libffi mingw-w64-clang-x86_64-z3 mingw-w64-clang-x86_64-python mingw-w64-clang-x86_64-compiler-rt mingw-w64-clang-x86_64-libc++
update: true
- name: Build Clang/LLVM
if: steps.clang-cache.outputs.cache-hit != 'true'
shell: msys2 {0}
env:
MSYSTEM: CLANG64
run: |
pushd compiler+runtime
./bin/build-clang
popd
ls -al compiler+runtime/build/llvm-install
build-jank:
needs:
- windows-build-clang
strategy:
fail-fast: false
matrix:
include:
## Release
- name: Windows - release
os: windows-2022
build_type: Debug
sanitize: none
analyze: off
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
env:
JANK_MATRIX_ID: ${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.sanitize }}
JANK_BUILD_TYPE: ${{ matrix.build_type }}
JANK_LINT: ${{ matrix.lint }}
JANK_COVERAGE: ${{ matrix.coverage }}
JANK_ANALYZE: ${{ matrix.analyze }}
JANK_SANITIZE: ${{ matrix.sanitize }}
JANK_PACKAGE: ${{ matrix.package }}
ASAN_OPTIONS: detect_leaks=0
TERM: xterm
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
HOMEBREW_NO_AUTO_UPDATE: 1
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Homebrew packages
if: runner.os == 'macOS'
run: |
brew install cmake ninja double-conversion pkg-config llvm ccache boost openssl zlib doctest boost clojure/tools/clojure
- uses: msys2/setup-msys2@v2
if: runner.os == 'Windows'
with:
MSYSTEM: CLANG64
install: unzip mingw-w64-clang-x86_64-ccache base-devel curl zip mingw-w64-clang-x86_64-git-lfs mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-libffi mingw-w64-clang-x86_64-doctest mingw-w64-clang-x86_64-libzip mingw-w64-clang-x86_64-gc mingw-w64-clang-x86_64-boost
update: true
- name: Prepare java
if: runner.os == 'Windows'
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: '25'
- name: Locate java (MS-Windows)
if: runner.os == 'Windows'
id: find
shell: pwsh
run: |
$java = (Get-Command java).Path
$dir = Split-Path $java
"java_dir=$dir" >> $env:GITHUB_OUTPUT
- name: Cache Clang/LLVM
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684
with:
path: |
${{ github.workspace }}/compiler+runtime/build/llvm-install
key: clang-${{ runner.os }}-${{ hashFiles('compiler+runtime/bin/build-clang') }}
- name: Cache ccache object files
if: matrix.analyze == 'off'
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
with:
path: |
${{ github.workspace }}/compiler+runtime/.ctcache
key: ccache-${{ env.JANK_MATRIX_ID }}-${{ github.ref_name }}
- name: Cache ctcache object files
if: matrix.analyze == 'on'
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
with:
path: |
${{ github.workspace }}/compiler+runtime/.ctcache
key: ctcache-${{ env.JANK_MATRIX_ID }}-${{ github.ref_name }}
- name: Build and test jank (MS-Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
env:
msystem: CLANG64
id: jank-build-step-win
run: |
curl -sL -o install-bb https://raw.githubusercontent.com/babashka/babashka/master/install
./install-bb
curl -sL https://raw.githubusercontent.com/borkdude/deps.clj/master/install > install_clojure
./install_clojure --as-clj
JAVA_DIR=$(cygpath -u "${{ steps.find.outputs.java_dir }}")
pushd compiler+runtime
./bin/build-clang -i
clang++ --version
popd
if [[ "${JANK_SANITIZE}" != "none" || "${JANK_COVERAGE}" == "on" ]];
then
export JANK_SKIP_AOT_CHECK=1
fi
PATH="$PATH:$JAVA_DIR" JANK_INSTALL_DEPS=true ./bin/jank/check_everything.clj