Skip to content

Release Build

Release Build #64

Workflow file for this run

name: Release Build
on:
workflow_dispatch:
permissions:
contents: read
jobs:
macOS:
if: github.repository == 'darktable-org/darktable' || github.event_name == 'workflow_dispatch'
name: macOS
runs-on: ${{ matrix.build.os }}
environment: Release Build
strategy:
fail-fast: true
matrix:
build:
- { os: macos-14, xcode: 16.2, deployment: 14.0 } # LLVM16, arm64
- { os: macos-15-intel, xcode: "26.1.1", deployment: 15.0 } # LLVM16, arm64
compiler:
- { compiler: XCode, CC: cc, CXX: c++ }
btype: [ Release ]
eco: [-DBINARY_PACKAGE_BUILD=ON -DBUILD_CURVE_TOOLS=ON -DBUILD_NOISE_TOOLS=ON -DUSE_GRAPHICSMAGICK=ON -DUSE_IMAGEMAGICK=OFF]
target:
- skiptest
generator:
- Ninja
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.build.xcode }}.app/Contents/Developer
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.build.deployment }}
SRC_DIR: ${{ github.workspace }}/src
BUILD_DIR: ${{ github.workspace }}/src/build
INSTALL_PREFIX: ${{ github.workspace }}/src/build/macosx
ECO: ${{ matrix.eco }}
CMAKE_BUILD_TYPE: ${{ matrix.btype }}
GENERATOR: ${{ matrix.generator }}
TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ vars.RELEASE_TAG }}
submodules: true
path: src
- name: Install Base Dependencies
run: |
brew update > /dev/null || true
cd src/.ci
export HOMEBREW_NO_INSTALL_UPGRADE=1
brew bundle --verbose || true
# rebuild graphicsmagick for macOS bundling
export HOMEBREW_NO_INSTALL_FROM_API=1
gm_formula=`brew edit --print-path graphicsmagick`
cat $gm_formula | sed 's/--with-modules/--disable-installed/1' > gm_formula.tmp
mv gm_formula.tmp $gm_formula
brew reinstall --build-from-source --force graphicsmagick
# handle keg-only libs
brew link --force libomp
brew link --force libsoup
- name: Cancel workflow if job fails
if: ${{ failure() }}
uses: andymckay/cancel-action@0.4
- name: Build and Install
run: |
cmake -E make_directory "${BUILD_DIR}";
cmake -E make_directory "${INSTALL_PREFIX}";
./src/.ci/ci-script.sh;
- name: Check if it runs
run: |
${INSTALL_PREFIX}/bin/darktable --version || true
${INSTALL_PREFIX}/bin/darktable-cli \
--width 2048 --height 2048 \
--hq true --apply-custom-presets false \
"${SRC_DIR}/src/tests/integration/images/mire1.cr2" \
"${SRC_DIR}/src/tests/integration/0000-nop/nop.xmp" \
output.png \
--core --disable-opencl --conf host_memory_limit=8192 \
--conf worker_threads=4 -t 4 \
--conf plugins/lighttable/export/force_lcms2=FALSE \
--conf plugins/lighttable/export/iccintent=0
- name: Build macOS package
run: |
./src/packaging/macosx/3_make_hb_darktable_package.sh
- name: Create DMG file
run: |
./src/packaging/macosx/4_make_hb_darktable_dmg.sh
- name: Get architecture
run: |
echo "ARCHITECTURE=$(uname -m)" >> $GITHUB_ENV
- name: Get version info
run: |
cd ${{ env.SRC_DIR }}
echo "VERSION=$(git describe --tags | sed 's/^release-//;s/-/+/;s/-/~/;s/rc/~rc/')-${{ env.ARCHITECTURE }}" >> $GITHUB_ENV
- name: Package upload
if: ${{ success() && matrix.btype == 'Release' && matrix.target == 'skiptest' }}
uses: actions/upload-artifact@v4
with:
name: darktable-${{ env.VERSION }}.dmg
path: ${{ env.INSTALL_PREFIX }}/darktable-${{ env.VERSION }}.dmg
retention-days: 2