-
Notifications
You must be signed in to change notification settings - Fork 25
158 lines (134 loc) · 5.54 KB
/
Copy pathnightly.yml
File metadata and controls
158 lines (134 loc) · 5.54 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
# Copyright (c) 2025, Arm Limited and affiliates.
# Part of the Arm Toolchain project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
# Changes from Qualcomm Technologies, Inc. are provided under the following license:
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# This workflow runs our common build scripts in parallel for multiple operating
# systems and architectures. All runtimes are built on Linux x86_64 and copied to
# other build hosts.
#
# It is intended to be triggered as part of a **nightly build** to
# validate our typical build configurations and test them automatically.
#
# Other build configurations such as building the runtimes on non-Linux
# x86_64 platforms are built and tested separately.
name: Nightly Build and Test
on:
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/nightly.yml'
schedule:
- cron: '0 4,10,19 * * *' # 9 PM, 3 AM, 12 PM PT
permissions:
contents: read
jobs:
build-and-test-Linux-x86:
# Don't run on forks
if: github.repository == 'qualcomm/cpullvm-toolchain'
name: build.sh on Linux-x86_64
runs-on: cpullvm-ubuntu24-x86_64
steps:
- name: Checkout source
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
# We build in the repository and rely on clean to cleanup possible
# old build products if the runner doesn't do it itself.
clean: true
- name: Apply llvm-project patches
run: python3 qualcomm-software/cmake/patch_repo.py --method apply qualcomm-software/patches/llvm-project
- name: Build
run: ./qualcomm-software/scripts/build.sh
- name: Upload built packages
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: success()
with:
name: cpullvm-packages-build.sh-Linux-x86
path: build*/cpullvm-*.tar.xz
if-no-files-found: error
retention-days: 7
- name: Test
run: ./qualcomm-software/scripts/test.sh
- name: Upload test results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: always()
with:
name: test-results-build.sh-Linux-x86
path: build/**/lit_results.junit.xml
build-and-test:
if: github.repository == 'qualcomm/cpullvm-toolchain'
name: ${{ matrix.build_script }} on ${{ matrix.target_os }}
needs: build-and-test-Linux-x86
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- build_script: build_copy_runtimes.sh
test_script: test.sh
install_script: install_dependencies.sh
target_os: Linux-AArch64
runner: ubuntu-24.04-arm
- build_script: build_musl-embedded_overlay.sh
test_script: ''
install_script: ''
target_os: Linux-x86_64
runner: cpullvm-ubuntu24-x86_64
- build_script: build_copy_runtimes.ps1
test_script: test.ps1
install_script: install_dependencies.ps1
target_os: Windows-x86_64
runner: windows-2025
- build_script: build_copy_runtimes.ps1
test_script: test.ps1
install_script: install_dependencies.ps1
target_os: Windows-AArch64
runner: windows-11-arm
steps:
# Not setting these can cause lit test failures on Windows machines when
# files with ex: different line endings are compared.
- name: Preconfigure git
shell: bash
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git config --global core.longpaths true
- name: Checkout source
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
# We build in the repository and rely on clean to cleanup possible
# old build products if the runner doesn't do it itself.
clean: true
- name: Download Linux-x86 package
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: cpullvm-packages-build.sh-Linux-x86
- name: Install dependencies
if: matrix.install_script != ''
run: ./qualcomm-software/scripts/${{ matrix.install_script }}
- name: Apply llvm-project patches
run: python3 qualcomm-software/cmake/patch_repo.py --method apply qualcomm-software/patches/llvm-project
- name: Build
run: ./qualcomm-software/scripts/${{ matrix.build_script }}
- name: Upload built packages
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: success()
with:
name: cpullvm-packages-${{ matrix.build_script }}-${{ matrix.target_os }}
path: |
build*/cpullvm-*.tar.xz
build*/cpullvm-*.zip
!build/cpullvm-*-Linux-x86_64.tar.xz
retention-days: 7
- name: Test
if: matrix.test_script != ''
run: ./qualcomm-software/scripts/${{ matrix.test_script }}
- name: Upload test results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: always()
with:
name: test-results-${{ matrix.build_script }}-${{ matrix.target_os }}
path: build/**/lit_results.junit.xml