forked from software-mansion/react-native-reanimated
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (66 loc) · 2.4 KB
/
macos-build.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
name: Test macOS build
on:
pull_request:
paths:
- '.github/workflows/macos-build.yml'
- 'RNReanimated.podspec'
- 'apple/**'
- 'Common/**'
- 'MacOSExample/package.json'
- 'MacOSExample/ios/**'
- 'MacOSExample/macos/**'
merge_group:
branches:
- main
push:
branches:
- main
jobs:
build:
runs-on: macos-12
env:
WORKING_DIRECTORY: MacOSExample
concurrency:
group: macos-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Restore Reanimated node_modules from cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-macos-node-modules-reanimated-${{ hashFiles('yarn.lock') }}
restore-keys: ${{ runner.os }}-macos-node-modules-reanimated-
- name: Install Reanimated node_modules
run: yarn install --frozen-lockfile
- name: Restore app node_modules from cache
uses: actions/cache@v3
with:
path: ${{ env.WORKING_DIRECTORY }}/node_modules
key: ${{ runner.os }}-macos-node-modules-${{ env.WORKING_DIRECTORY }}-${{ hashFiles(format('{0}/yarn.lock', env.WORKING_DIRECTORY)) }}
restore-keys: ${{ runner.os }}-macos-node-modules-${{ env.WORKING_DIRECTORY }}-
- name: Install app node_modules
working-directory: ${{ env.WORKING_DIRECTORY }}
run: yarn install --frozen-lockfile
- name: Restore Pods from cache
uses: actions/cache@v3
with:
path: |
${{ env.WORKING_DIRECTORY }}/macos/Pods
~/Library/Caches/CocoaPods
~/.cocoapods
key: ${{ runner.os }}-macos-pods-${{ env.WORKING_DIRECTORY }}-${{ hashFiles(format('{0}/macos/Podfile.lock', env.WORKING_DIRECTORY)) }}
- name: Install Pods
working-directory: ${{ env.WORKING_DIRECTORY }}/macos
run: pod install
- name: Restore build artifacts from cache
uses: actions/cache@v3
with:
path: |
${{ env.WORKING_DIRECTORY }}/macos/build
~/Library/Developer/Xcode/DerivedData
key: ${{ runner.os }}-macos-build-${{ env.WORKING_DIRECTORY }}-${{ hashFiles(format('{0}/macos/Podfile.lock', env.WORKING_DIRECTORY)) }}
- name: Build app
working-directory: ${{ env.WORKING_DIRECTORY }}
run: yarn macos