-
Notifications
You must be signed in to change notification settings - Fork 1
187 lines (170 loc) · 6.54 KB
/
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
name: macOS Builds
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [macos-12, macos-14]
include:
- os: macos-12
arch: x64
osxtarget: 12.0
- os: macos-14
arch: arm64
osxtarget: 14.0
fail-fast: false
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- name: Get version
uses: actions/checkout@v4
with:
path: repo
- name: Download source
run: |
export ART_DIR="ART-$(cat repo/version.txt)"
#wget https://bitbucket.org/agriggio/art/downloads/${ART_DIR}.tar.xz
#tar xJf ${ART_DIR}.tar.xz
git clone --depth 1 --branch macos-bundle-simplified https://[email protected]/agriggio/art.git ${ART_DIR}
- if: ${{ matrix.os == 'macos-12' }}
name: Install MacPorts x64
run: |
wget https://github.com/macports/macports-base/releases/download/v2.10.4/MacPorts-2.10.4-12-Monterey.pkg
sudo installer -pkg MacPorts-2.10.4-12-Monterey.pkg -target /
- if: ${{ matrix.os == 'macos-14' }}
name: Install MacPorts arm64
run: |
wget https://github.com/macports/macports-base/releases/download/v2.10.4/MacPorts-2.10.4-14-Sonoma.pkg
sudo installer -pkg MacPorts-2.10.4-14-Sonoma.pkg -target /
export PATH=/opt/local/libexec/gnubin:/opt/local/bin:/opt/local/sbin:$PATH
- name: Install base ports
run: |
export PATH=/opt/local/libexec/gnubin:/opt/local/bin:/opt/local/sbin:$PATH
sudo port -d install pkgconfig
sudo port install automake
sudo port install autoconf
sudo port install libtool
sudo port install cmake
sudo port install glib2 +quartz
sudo port install gtkmm3 +quartz
sudo port install gtk-osx-application-gtk3
sudo port install libomp
sudo port install clang-17
sudo port install librsvg-devel
sudo port install lensfun
sudo port install exiv2
sudo port install fftw-3-single +openmp
sudo port install openexr
sudo port install lcms2
- name: Install LibRaw
run: |
export PATH=/opt/local/libexec/gnubin:/opt/local/bin:/opt/local/sbin:$PATH
INSTDIR=/opt/art-deps
git clone --depth 1 https://github.com/LibRaw/LibRaw.git
git clone --depth 1 https://github.com/LibRaw/LibRaw-cmake.git
cd LibRaw
ln -s ../LibRaw-cmake/CMakeLists.txt
ln -s ../LibRaw-cmake/cmake
mkdir build
cd build
/opt/local/bin/cmake \
-DCMAKE_C_COMPILER=/opt/local/bin/clang-mp-17 \
-DCMAKE_CXX_COMPILER=/opt/local/bin/clang++-mp-17 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$INSTDIR \
-DENABLE_X3FTOOLS=1 \
..
make -j$(nproc)
sudo make install
- name: Install CTL
run: |
export PATH=/opt/local/libexec/gnubin:/opt/local/bin:/opt/local/sbin:$PATH
INSTDIR=/opt/art-deps
git clone --depth 1 https://github.com/ampas/CTL.git
mkdir build-CTL
cd build-CTL
/opt/local/bin/cmake \
-DCMAKE_C_COMPILER=/opt/local/bin/clang-mp-17 \
-DCMAKE_CXX_COMPILER=/opt/local/bin/clang++-mp-17 \
-DCMAKE_INSTALL_PREFIX=$INSTDIR \
-DCMAKE_BUILD_TYPE=Release \
../CTL
make -j$(nproc)
sudo make install
- name: Install OpenColorIO
run: |
export PATH=/opt/local/libexec/gnubin:/opt/local/bin:/opt/local/sbin:$PATH
INSTDIR=/opt/art-deps
OCIO_VERSION='2.4.0'
mkdir ocio
cd ocio
wget https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/refs/tags/v${OCIO_VERSION}.tar.gz
tar xzf v${OCIO_VERSION}.tar.gz
mkdir build
cd build
/opt/local/bin/cmake \
-DCMAKE_C_COMPILER=/opt/local/bin/clang-mp-17 \
-DCMAKE_CXX_COMPILER=/opt/local/bin/clang++-mp-17 \
-DCMAKE_INSTALL_PREFIX=$INSTDIR \
-DCMAKE_BUILD_TYPE=Release \
-DOCIO_BUILD_PYTHON=OFF \
-DOCIO_BUILD_APPS=0 \
-DOCIO_BUILD_TESTS=0 \
-DOCIO_BUILD_GPU_TESTS=0 \
../OpenColorIO-${OCIO_VERSION}
make -j$(nproc)
sudo make install
- name: Configure build
run: |
export PATH=/opt/local/libexec/gnubin:/opt/local/bin:/opt/local/sbin:$PATH
export ART_DIR="ART-$(cat repo/version.txt)"
mkdir build
cd build
export PKG_CONFIG_PATH=/opt/art-deps/lib/pkgconfig
/opt/local/bin/cmake \
-DCMAKE_C_COMPILER=/opt/local/bin/clang-mp-17 \
-DCMAKE_CXX_COMPILER=/opt/local/bin/clang++-mp-17 \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_CTL=1 \
-DENABLE_LIBRAW=1 \
-DCTL_INCLUDE_DIR=/opt/art-deps/include/CTL \
-DCMAKE_LIBRARY_PATH=/opt/art-deps/lib \
-DCMAKE_OSX_DEPLOYMENT_TARGET=${{ matrix.osxtarget }} \
../${ART_DIR}
cd ..
- name: Build
run: |
export PATH=/opt/local/libexec/gnubin:/opt/local/bin:/opt/local/sbin:$PATH
/opt/local/bin/cmake --build build --target install
- name: Include Lensfun
run: |
export PATH=/opt/local/libexec/gnubin:/opt/local/bin:/opt/local/sbin:$PATH
lensfun-update-data
- name: Create bundle
run: |
ART_NAME="ART-$(cat repo/version.txt)"
OUTDIR=$(pwd)
cd build/Release/ART.app
python "${OUTDIR}/${ART_NAME}/tools/osx/bundle_ART.py" \
-o "${OUTDIR}" -v -r /opt/art-deps/lib \
-d "${ART_NAME}_${{ matrix.os }}_${{ matrix.arch }}"
cd "${OUTDIR}"
- name: Prepare artifact name
run: |
ARTIFACT_NAME="ART-$(cat repo/version.txt)-${{ matrix.os }}-${{ matrix.arch }}.dmg"
echo "ARTIFACT_NAME=$ARTIFACT_NAME" >> $GITHUB_ENV
#echo "RELEASE_TAG=v$(cat repo/version.txt)" >> $GITHUB_ENV
echo "RELEASE_TAG=macOS-testing" >> $GITHUB_ENV
- name: Publish release
uses: ncipollo/release-action@v1
with:
tag: ${{ env.RELEASE_TAG }}
body: ${{ env.RELEASE_TAG }}
allowUpdates: true
makeLatest: false
artifacts: ${{ env.ARTIFACT_NAME }}