Nightly PKG macOS Test #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Nightly PKG macOS Test | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
actions: write # We need this to be able to cancel workflow if job fails | |
jobs: | |
macOS: | |
if: github.repository == 'darktable-org/darktable' || github.event_name == 'workflow_dispatch' | |
name: Nightly darktable macOS | |
runs-on: ${{ matrix.build.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
build: | |
# - { os: macos-13, xcode: 15.2, deployment: 13.5 } # LLVM16, x86_64 | |
- { os: macos-14, xcode: 15.4, deployment: 14.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=OFF -DUSE_IMAGEMAGICK=ON] | |
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: | |
- name: Checkout darktable master branch | |
run: | | |
# Note that we can't make a shallow clone to reduce clone traffic and time, as we have to | |
# fetch the entire history to correctly generate the version for the disk image filename | |
git clone https://github.com/darktable-org/darktable src | |
pushd src | |
git submodule init | |
git config submodule.src/tests/integration.update none | |
git submodule update | |
popd | |
- name: Install Base Dependencies | |
run: | | |
brew update > /dev/null || true | |
# brew upgrade || true # No need for a very time-consuming upgrade of ALL packages | |
brew install --force gd # See https://github.com/Homebrew/homebrew-core/issues/141766 | |
brew tap Homebrew/bundle | |
cd src/.ci | |
export HOMEBREW_NO_INSTALL_UPGRADE=1 | |
brew bundle --verbose || true | |
# handle keg-only libs | |
brew link --force libomp | |
brew link --force libsoup@2 | |
- name: Cancel workflow if job fails | |
if: ${{ failure() }} | |
uses: andymckay/cancel-action@0.5 | |
- name: Build and Install | |
run: | | |
cmake -E make_directory "${BUILD_DIR}"; | |
cmake -E make_directory "${INSTALL_PREFIX}"; | |
./src/.ci/ci-script.sh; | |
- name: Build macOS package | |
run: | | |
./src/packaging/macosx/3_make_hb_darktable_package.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 --match release-* | sed 's/^release-//;s/-/+/;s/-/~/;s/rc/~rc/')-${{ env.ARCHITECTURE }}" >> $GITHUB_ENV | |
# - name: "zip package" | |
# run: | | |
# cd ${{ env.INSTALL_PREFIX }}/package | |
# zip -rq darktable.zip darktable.app | |
- name: Package upload | |
if: ${{ success() && matrix.btype == 'Release' && matrix.target == 'skiptest' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: darktable-${{ env.VERSION }} | |
path: ${{ env.INSTALL_PREFIX }}/package/darktable.app | |
retention-days: 2 |