Use Cache Only in CI #61
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| push: # This triggers on any commit | |
| branches: | |
| - '**' # Runs on all branches | |
| pull_request: | |
| jobs: | |
| build: | |
| # YAML anchor for the runner OS | |
| # These images are arm64 unless specified: https://github.com/actions/runner-images | |
| # macOS CI is 10x more expensive than linux: https://docs.github.com/en/billing/concepts/product-billing/github-actions | |
| runs-on: &runner-os [macos-15] # [macos-14, macos-15, macos-15-intel, macos-26] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Cache Adobe DNG Converter.app | |
| id: cache-dng-app | |
| uses: actions/cache@v3 | |
| with: | |
| path: /Applications/Adobe\ DNG\ Converter.app | |
| key: dng-app-17-5 | |
| restore-keys: | | |
| dng-app- | |
| - name: Download and Install Adobe DNG Converter | |
| if: steps.cache-dng-app.outputs.cache-hit != 'true' | |
| run: | | |
| printf -- "-Downloading the DNG Converter .dmg file\n" | |
| curl -L -o DNGConverter_17_5.dmg https://download.adobe.com/pub/adobe/dng/mac/DNGConverter_17_5.dmg | |
| printf -- "\n\n-Mounting the DMG file\n" | |
| hdiutil attach DNGConverter_17_5.dmg | |
| # Rosetta2 is needed for AdobeDNGConverter and is installed on arm64 Macs | |
| if [ -e /Library/Apple/usr/libexec/oah/libRosettaRuntime ]; then | |
| printf -- "\n\n-Running on Apple Silicon\n" | |
| else | |
| printf -- "\n\n-Running on Intel\n" | |
| fi | |
| printf -- "\n\n-Installing Adobe DNG Converter\n" | |
| sudo installer -pkg /Volumes/DNGConverter_17_5/DNGConverter_17_5.pkg -target `pwd` | |
| printf -- "\n\n-Unmounting the DMG file\n" | |
| hdiutil detach /Volumes/DNGConverter_17_5 | |
| printf -- "\n\n-Verifying the installation\n" | |
| /Applications/Adobe\ DNG\ Converter.app/Contents/MacOS/Adobe\ DNG\ Converter -d | |
| test: | |
| needs: build | |
| runs-on: *runner-os | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Restore Adobe DNG Converter.app from cache | |
| id: cache-dng-app | |
| uses: actions/cache@v3 | |
| with: | |
| path: /Applications/Adobe\ DNG\ Converter.app | |
| key: dng-app-17-5 | |
| restore-keys: | | |
| dng-app- | |
| - name: Verify installation | |
| run: | | |
| "/Applications/Adobe DNG Converter.app/Contents/MacOS/Adobe DNG Converter" -d | |
| - name: Test organizeGoProDNG.sh | |
| run: | | |
| chmod +x tests/test_organizeGoProDNG.sh | |
| bash tests/test_organizeGoProDNG.sh | |
| - name: Test compare_AdobeDNGConverter_arguments.sh | |
| run: | | |
| chmod +x tests/test_compare_AdobeDNGConverter_arguments.sh | |
| bash tests/test_compare_AdobeDNGConverter_arguments.sh |