-
Notifications
You must be signed in to change notification settings - Fork 35
165 lines (139 loc) · 4.8 KB
/
run_pr_tests.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
# Simple workflow for running non-documentation PR testing
name: Run ock tests for PR testing
on:
workflow_call:
inputs:
llvm_latest:
required: true
type: string
llvm_previous:
required: true
type: string
update_cache:
default: false
type: boolean
workflow_dispatch:
inputs:
llvm_latest:
required: true
type: string
llvm_previous:
required: true
type: string
update_cache:
default: false
type: boolean
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# build and run host x86_64, execute UnitCL and lit tests and build and run offline
run_host_x86_64:
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v4
# installs tools, ninja, installs llvm and sets up sccahe
- name: setup-ubuntu
uses: ./.github/actions/setup_ubuntu_build
with:
llvm_version: ${{ inputs.llvm_latest }}
llvm_build_type: RelAssert
# These need to match the configurations of build_pr_cache to use the cache effectively
- name: build host x86_64 online release
uses: ./.github/actions/do_build_ock
with:
build_type: Release
- name: run just online lit
run:
ninja -C build check-ock-all-lit
- name: run host online check
run:
ninja -C build check-ock-UnitCL
# use the previous build for online to get clc
- name: build host x86_64 offline release
uses: ./.github/actions/do_build_ock
with:
build_type: Release
extra_flags: -DCA_RUNTIME_COMPILER_ENABLED=OFF -DCA_EXTERNAL_CLC=${{ github.workspace }}/build/bin/clc
build_dir: build_offline
build_targets: UnitCL
assemble_spirv_ll_lit_test_offline: ON
- name: run host x86_64 offline
run:
ninja -C build_offline check-ock-UnitCL
# build and run riscv m1, execute UnitCL and lit tests
run_riscv_m1:
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v4
# installs tools, ninja, installs llvm and sets up sccahe
- name: setup-ubuntu
uses: ./.github/actions/setup_ubuntu_build
with:
llvm_version: ${{ inputs.llvm_latest }}
llvm_build_type: RelAssert
- name: build riscv M1
uses: ./.github/actions/do_build_ock/do_build_m1
- name: run riscv M1 lit
run:
ninja -C build check-ock-all-lit
- name: run riscv M1 UnitCL tests
run:
ninja -C build check-ock-UnitCL
# run clang-format-diff on the repo
run_clang_format:
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: setup-ubuntu-clang-format
run:
pip install clang-format==19.1.0
- name: run clang-format
run: |
# we've installed clang-format-16 in the docker via pip, which just installs it as clang-format,
# so just use clang-format-diff and -b clang-format directly
git fetch origin ${{ github.base_ref }}
git diff --no-color origin/${{ github.base_ref }} | \
clang-format-diff.py -p1 -regex \
"^(?!(.+\\/)*(external|cookie)\\/).*\\.(c|cc|cxx|cpp|h|hh|hxx|hpp)$" -b clang-format \
> clang-format.diff
if [ `wc -l < clang-format.diff` = 0 ]; then
echo 'success: clang-format did not generate a diff'
exit 0
fi
cat clang-format.diff
exit 1
############### JOB mr-ubuntu-gcc-x86_64-riscv-fp16-cl3-0-unitcl_vecz:
mr-ubuntu-gcc-x86_64-riscv-fp16-cl3-0-unitcl_vecz:
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- name: Checkout repo
uses: actions/[email protected]
- name: setup-ubuntu
uses: ./.github/actions/setup_ubuntu_build
with:
llvm_version: ${{ inputs.llvm_latest }}
llvm_build_type: RelAssert
- run: echo WORKSPACE is $GITHUB_WORKSPACE && echo PWD is `pwd` && ls -al
- name: build ock
uses: ./.github/actions/do_build_ock
with:
build_targets: check-ock-UnitCL-group-vecz
mux_targets_enable: riscv
mux_compilers_enable: riscv
riscv_enabled: ON
enable_rvv_scalable_vecz_check: ON
enable_rvv_scalable_vp_vecz_check: ON
use_linker: gold
hal_description: RV64GCV_Zfh
hal_refsi_soc: G1
hal_refsi_thread_mode: WG
debug_support: ON
gtest_launcher: "/usr/bin/python;-u;${{ github.workspace }}/scripts/gtest-terse-runner.py"