Skip to content

Commit 42aadc7

Browse files
authored
Merge pull request #11 from mattpopovich/7-cache-ci
Cache CI
2 parents 6b65ff8 + ede5cee commit 42aadc7

1 file changed

Lines changed: 52 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,29 @@ on:
66
- '**' # Runs on all branches
77
pull_request:
88

9+
910
jobs:
1011
build:
11-
runs-on: ${{ matrix.os }}
12-
strategy:
13-
matrix:
14-
# These images are arm64 unless specified: https://github.com/actions/runner-images
15-
os: [macos-15] # macOS CI is expensive: [macos-14, macos-15, macos-15-intel, macos-26]
12+
# YAML anchor for the runner OS
13+
# These images are arm64 unless specified: https://github.com/actions/runner-images
14+
# macOS CI is 10x more expensive than linux: https://docs.github.com/en/billing/concepts/product-billing/github-actions
15+
runs-on: &runner-os [macos-15] # [macos-14, macos-15, macos-15-intel, macos-26]
1616

1717
steps:
1818
- name: Checkout repository
1919
uses: actions/checkout@v5
2020

21-
- name: Install Adobe DNG Converter
21+
- name: Cache Adobe DNG Converter.app
22+
id: cache-dng-app
23+
uses: actions/cache@v3
24+
with:
25+
path: /Applications/Adobe\ DNG\ Converter.app
26+
key: dng-app-17-5
27+
restore-keys: |
28+
dng-app-
29+
30+
- name: Download and Install Adobe DNG Converter
31+
if: steps.cache-dng-app.outputs.cache-hit != 'true'
2232
run: |
2333
printf -- "-Downloading the DNG Converter .dmg file\n"
2434
curl -L -o DNGConverter_17_5.dmg https://download.adobe.com/pub/adobe/dng/mac/DNGConverter_17_5.dmg
@@ -39,6 +49,42 @@ jobs:
3949
printf -- "\n\n-Unmounting the DMG file\n"
4050
hdiutil detach /Volumes/DNGConverter_17_5
4151
52+
- name: Verify installation
53+
run: |
54+
du -sh /Applications/Adobe*
55+
/Applications/Adobe\ DNG\ Converter.app/Contents/MacOS/Adobe\ DNG\ Converter -d
56+
57+
- name: Upload installed environment
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: dng-env
61+
path: /Applications/Adobe\ DNG\ Converter.app
62+
retention-days: 30
63+
64+
test:
65+
needs: build
66+
runs-on: *runner-os
67+
68+
steps:
69+
- name: Checkout repository
70+
uses: actions/checkout@v5
71+
72+
- name: Download installed environment
73+
uses: actions/download-artifact@v4
74+
with:
75+
name: dng-env
76+
path: /tmp/dng-app
77+
78+
- name: Move environment to /Applications
79+
run: |
80+
sudo mkdir -p "/Applications/Adobe DNG Converter.app"
81+
sudo cp -R /tmp/dng-app/* "/Applications/Adobe DNG Converter.app/"
82+
sudo chmod +x "/Applications/Adobe DNG Converter.app/Contents/MacOS/Adobe DNG Converter"
83+
84+
- name: Verify installation
85+
run: |
86+
"/Applications/Adobe DNG Converter.app/Contents/MacOS/Adobe DNG Converter" -d
87+
4288
- name: Test organizeGoProDNG.sh
4389
run: |
4490
chmod +x tests/test_organizeGoProDNG.sh

0 commit comments

Comments
 (0)