-
Notifications
You must be signed in to change notification settings - Fork 115
171 lines (169 loc) · 5.99 KB
/
CI-macOS.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
166
167
168
169
170
171
on:
workflow_call:
inputs:
os:
required: true
type: string
os-deployment_target:
required: true
type: string
compiler-family:
required: true
type: string
compiler-version:
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:
macOS:
name: ${{ inputs.compiler-family }}.${{ inputs.compiler-version }}.targeting.OSX.${{ inputs.os-deployment_target }}.${{ inputs.flavor }}
timeout-minutes: 11
runs-on: ${{ inputs.os }}
steps:
- name: Fetch/Checkout RawSpeed git repo
timeout-minutes: 1
uses: actions/checkout@v4
with:
path: 'rawspeed'
fetch-depth: 1
- name: Remove unneeded brew formulas/casks
timeout-minutes: 3
env:
SRC_DIR: ${{ github.workspace }}/rawspeed
run: |
set -xe
brew update --quiet
brew tap Homebrew/bundle
cd "${SRC_DIR}/.ci/"
brew bundle cleanup --quiet --force
brew autoremove --quiet
brew cleanup --quiet --prune=all
- name: Install/Update Base Dependencies
timeout-minutes: 1
env:
SRC_DIR: ${{ github.workspace }}/rawspeed
run: |
set -xe
cd "${SRC_DIR}/.ci/"
brew bundle --verbose
- name: Install Additional Dependencies (Coverage)
if: inputs.flavor == 'Coverage'
timeout-minutes: 1
run: |
set -xe
brew install zstd
- name: Configure
timeout-minutes: 4
env:
DEVELOPER_DIR: /Applications/Xcode_${{ inputs.compiler-version }}.app/Contents/Developer
MACOSX_DEPLOYMENT_TARGET: ${{ inputs.os-deployment_target }}
CC: ${{ inputs.compiler-CC }}
CXX: ${{ inputs.compiler-CXX }}
CFLAGS: -mmacosx-version-min=${{ inputs.os-deployment_target }}
CXXFLAGS: -mmacosx-version-min=${{ inputs.os-deployment_target }}
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 -DWITH_OPENMP=OFF
FLAVOR: ${{ inputs.flavor }}
TARGET: configure
run: |
set -xe
cmake -E make_directory "${BUILD_DIR}"
cmake -E make_directory "${INSTALL_PREFIX}"
"${SRC_DIR}/.ci/ci-script.sh"
- name: Build
timeout-minutes: 7
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
"${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
"${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 }}/macOS
INSTALL_PREFIX: ${{ github.workspace }}/rawspeed-install
FLAVOR: ${{ inputs.flavor }}
TARGET: coverage
run: |
set -xe
"${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
"${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 }}/macOS
INSTALL_PREFIX: ${{ github.workspace }}/rawspeed-install
FLAVOR: ${{ inputs.flavor }}
TARGET: coverage_benchmarks
run: |
set -xe
"${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 (macOS reports)
uses: actions/cache/save@v4
with:
path: ${{ env.COVERAGE_REPORT_PREFIX }}/macOS # relative path!
key: coverage-${{ github.sha }}-macOS
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
"${SRC_DIR}/.ci/ci-script.sh"