-
Notifications
You must be signed in to change notification settings - Fork 141
166 lines (164 loc) · 5.54 KB
/
Copy pathCI-windows-msys2.yml
File metadata and controls
166 lines (164 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
159
160
161
162
163
164
165
166
on:
workflow_call:
inputs:
os:
required: true
type: string
msys2-msystem:
required: true
type: string
msys2-arch:
required: true
type: string
compiler-family:
required: true
type: string
compiler-CC:
required: true
type: string
compiler-CXX:
required: true
type: string
flavor:
required: true
type: string
ECO:
type: string
env:
RPUU_DST: ${{ github.workspace }}/raw-camera-samples/raw.pixls.us-unique
COVERAGE_REPORT_PREFIX: rawspeed-coverage # relative to the workspace!
jobs:
windows-msys2:
timeout-minutes: 16
runs-on: ${{ inputs.os }}
name: ${{ inputs.os }}.${{ inputs.msys2-msystem }}.${{ inputs.compiler-family }}.${{ inputs.flavor }}
defaults:
run:
shell: msys2 {0}
steps:
- name: Fetch/Checkout RawSpeed git repo
timeout-minutes: 2
uses: actions/checkout@v6
with:
path: 'rawspeed'
fetch-depth: 1
- name: Install Base Dependencies
timeout-minutes: 3
uses: msys2/setup-msys2@v2
with:
cache: false
msystem: ${{ inputs.msys2-msystem }}
update: false
pacboy: >-
cc:p
gcc-libs:p
omp:p
cmake:p
ninja:p
libxml2:p
pugixml:p
libjpeg-turbo:p
zlib:p
- name: Install Additional Dependencies (Coverage)
if: inputs.flavor == 'Coverage'
timeout-minutes: 1
run: |
pacboy --noconfirm -S --needed zstd:p
- name: Configure
timeout-minutes: 3
env:
CC: ${{ inputs.compiler-CC }}
CXX: ${{ inputs.compiler-CXX }}
SRC_DIR: ${{ github.workspace }}/rawspeed
BUILD_DIR: ${{ github.workspace }}/rawspeed-build
INSTALL_PREFIX: ${{ github.workspace }}/rawspeed-install
ECO: ${{ inputs.ECO }} -DALLOW_DOWNLOADING_GOOGLETEST=ON -DALLOW_DOWNLOADING_GOOGLEBENCHMARK=ON
FLAVOR: ${{ inputs.flavor }}
TARGET: configure
run: |
set -xe
cmake -E make_directory "${BUILD_DIR}"
cmake -E make_directory "${INSTALL_PREFIX}"
$(cygpath ${SRC_DIR})/.ci/ci-script.sh
- name: Build
timeout-minutes: 13
env:
SRC_DIR: ${{ github.workspace }}/rawspeed
BUILD_DIR: ${{ github.workspace }}/rawspeed-build
INSTALL_PREFIX: ${{ github.workspace }}/rawspeed-install
FLAVOR: ${{ inputs.flavor }}
TARGET: build
run: |
set -xe
$(cygpath ${SRC_DIR})/.ci/ci-script.sh
- name: Test (unit tests)
timeout-minutes: 1
env:
SRC_DIR: ${{ github.workspace }}/rawspeed
BUILD_DIR: ${{ github.workspace }}/rawspeed-build
INSTALL_PREFIX: ${{ github.workspace }}/rawspeed-install
FLAVOR: ${{ inputs.flavor }}
TARGET: test
run: |
set -xe
$(cygpath ${SRC_DIR})/.ci/ci-script.sh
- name: Collect source coverage data (unit tests)
timeout-minutes: 1
if: inputs.flavor == 'Coverage'
env:
SRC_DIR: ${{ github.workspace }}/rawspeed
BUILD_DIR: ${{ github.workspace }}/rawspeed-build
COVERAGE_REPORT_PREFIX: ${{ github.workspace }}/${{ env.COVERAGE_REPORT_PREFIX }}/windows
INSTALL_PREFIX: ${{ github.workspace }}/rawspeed-install
FLAVOR: ${{ inputs.flavor }}
TARGET: coverage
run: |
set -xe
$(cygpath ${SRC_DIR})/.ci/ci-script.sh
mkdir -p "${COVERAGE_REPORT_PREFIX}"
mv "${BUILD_DIR}/gcov-reports-unittest" "${COVERAGE_REPORT_PREFIX}/unittests"
- name: Test (benchmarks)
timeout-minutes: 1
env:
SRC_DIR: ${{ github.workspace }}/rawspeed
BUILD_DIR: ${{ github.workspace }}/rawspeed-build
INSTALL_PREFIX: ${{ github.workspace }}/rawspeed-install
FLAVOR: ${{ inputs.flavor }}
TARGET: test_benchmarks
run: |
set -xe
$(cygpath ${SRC_DIR})/.ci/ci-script.sh
- name: Collect source coverage data (benchmarks)
timeout-minutes: 1
if: inputs.flavor == 'Coverage'
env:
SRC_DIR: ${{ github.workspace }}/rawspeed
BUILD_DIR: ${{ github.workspace }}/rawspeed-build
COVERAGE_REPORT_PREFIX: ${{ github.workspace }}/${{ env.COVERAGE_REPORT_PREFIX }}/windows
INSTALL_PREFIX: ${{ github.workspace }}/rawspeed-install
FLAVOR: ${{ inputs.flavor }}
TARGET: coverage_benchmarks
run: |
set -xe
$(cygpath ${SRC_DIR})/.ci/ci-script.sh
mkdir -p "${COVERAGE_REPORT_PREFIX}"
mv "${BUILD_DIR}/gcov-reports-benchmarks" "${COVERAGE_REPORT_PREFIX}/benchmarks"
- if: inputs.flavor == 'Coverage'
timeout-minutes: 1
name: Cache code coverage (windows reports)
uses: actions/cache/save@v5
with:
path: ${{ env.COVERAGE_REPORT_PREFIX }}/windows # relative path!
key: coverage-${{ github.sha }}-windows
enableCrossOsArchive: true
- name: Install
timeout-minutes: 1
env:
SRC_DIR: ${{ github.workspace }}/rawspeed
BUILD_DIR: ${{ github.workspace }}/rawspeed-build
INSTALL_PREFIX: ${{ github.workspace }}/rawspeed-install
FLAVOR: ${{ inputs.flavor }}
TARGET: install
run: |
set -xe
$(cygpath ${SRC_DIR})/.ci/ci-script.sh