-
-
Notifications
You must be signed in to change notification settings - Fork 161
117 lines (115 loc) · 4.09 KB
/
Copy pathci.yml
File metadata and controls
117 lines (115 loc) · 4.09 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
name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
tags: '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-unix:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- ubuntu-24.04-arm
- macos-latest
- macos-15-intel
steps:
- uses: actions/checkout@v7
- run: make -j$(getconf _NPROCESSORS_ONLN)
- run: make test
windows:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
# Install only what the build needs instead of `base-devel` plus the
# full `*-toolchain` meta-package. The msys2 package cache is already on
# by default and hits, but pacman still *extracts* every package on each
# run, and base-devel + the toolchain meta dominated setup time (it was
# ~3.5 min of pacman install on the arm runner). openlibm only needs make
# and a C compiler. The -gcc package pulls in binutils and the runtime;
# the -clang package requires lld and llvm-tools (which provides ar), so
# it is a complete toolchain on its own without the meta-package's unused
# extras (lldb, openmp, flang, ...).
include:
- { os: windows-latest, sys: mingw64, install: "make mingw-w64-x86_64-gcc" }
- { os: windows-latest, sys: mingw32, install: "make mingw-w64-i686-gcc" }
- { os: windows-latest, sys: ucrt64, install: "make mingw-w64-ucrt-x86_64-gcc" } # Experimental!
- { os: windows-latest, sys: clang64, install: "make mingw-w64-clang-x86_64-clang" } # Experimental!
- { os: windows-11-arm, sys: clangarm64, install: "make mingw-w64-clang-aarch64-clang" } # Experimental!
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v7
- name: Set up the desired MSYS2 environment
uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
install: ${{matrix.install}}
- run: make -j$(nproc)
- run: make test
strict-warnings:
# Dedicated -Werror lane. Pinned to a fixed image (not ubuntu-latest) so a
# compiler upgrade surfaces here as an explicit, isolated failure instead of
# breaking the whole matrix. See WERROR in Make.inc.
name: strict-werror (${{ matrix.cc }})
runs-on: ubuntu-24.04
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- { cc: gcc, flags: "" }
- { cc: clang, flags: "USECLANG=1 USEGCC=0" }
steps:
- uses: actions/checkout@v7
- name: Build with -Werror
run: make -j$(nproc) WERROR=1 ${{ matrix.flags }}
- name: Test
run: make test ${{ matrix.flags }}
code-coverage:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout Openlibm
uses: actions/checkout@v7
- name: Checkout Openlibm-test
uses: actions/checkout@v7
with:
repository: 'JuliaMath/openlibm-test'
path: 'openlibm-test'
- name: Setup LCOV
uses: hrishikesh-kadam/setup-lcov@v1
- name: Build Openlibm
run: make -j$(nproc) CODE_COVERAGE=1
- name: Run Test
run: |
make -j$(nproc) -C openlibm-test \
USE_OPENLIBM=1 OPENLIBM_HOME="$(pwd)" \
SKIP_FP_EXCEPT_TEST=1
- name: Show Test Result
run: cat openlibm-test/src/REPORT
- name: Gen Coverage Report
run: make gen-cov-report
- name: Upload coverage to Codecov
# Codecov token isn't exposed to forked-PR runs; skip the upload there.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
uses: codecov/codecov-action@v7
with:
files: ./cov-html/libopenlibm.info
token: ${{ secrets.CODECOV_TOKEN }}
- uses: actions/upload-artifact@v7
with:
name: code-coverage-report
path: ./cov-html/