mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-06 07:06:11 +00:00
79 lines
2.5 KiB
YAML
79 lines
2.5 KiB
YAML
name: Test macOS build
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- '.github/workflows/macos-build-test.yml'
|
|
- 'RNSVG.podspec'
|
|
- 'apple/**'
|
|
- 'Example/macos/**'
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
jobs:
|
|
build:
|
|
runs-on: macos-12
|
|
env:
|
|
WORKING_DIRECTORY: Example
|
|
concurrency:
|
|
group: macos-${{ github.ref }}
|
|
steps:
|
|
- name: Check out Git repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Restore svg node_modules from cache
|
|
uses: actions/cache@v2
|
|
id: cache-node-modules-svg
|
|
with:
|
|
path: |
|
|
node_modules
|
|
key: ${{ runner.os }}-node-modules-svg-${{ hashFiles('yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node-modules-svg
|
|
- name: Install svg dependencies
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Restore app node_modules from cache
|
|
uses: actions/cache@v2
|
|
id: cache-node-modules-app
|
|
with:
|
|
path: |
|
|
${{ env.WORKING_DIRECTORY }}/node_modules
|
|
key: ${{ runner.os }}-node-modules-${{ env.WORKING_DIRECTORY }}-${{ hashFiles('${{ env.WORKING_DIRECTORY }}/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node-modules-${{ env.WORKING_DIRECTORY }}-
|
|
- name: Install app dependencies
|
|
working-directory: ${{ env.WORKING_DIRECTORY }}
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Restore Pods from cache
|
|
uses: actions/cache@v2
|
|
id: cache-pods
|
|
with:
|
|
path: |
|
|
${{ env.WORKING_DIRECTORY }}/macos/Pods
|
|
~/Library/Caches/CocoaPods
|
|
~/.cocoapods
|
|
key: ${{ runner.os }}-pods-${{ env.WORKING_DIRECTORY }}-${{ hashFiles('${{ env.WORKING_DIRECTORY }}/macos/Podfile.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pods-${{ env.WORKING_DIRECTORY }}-
|
|
- name: Install Pods
|
|
working-directory: ${{ env.WORKING_DIRECTORY }}/macos
|
|
run: pod install
|
|
|
|
- name: Restore build artifacts from cache
|
|
uses: actions/cache@v2
|
|
id: cache-build
|
|
with:
|
|
path: |
|
|
${{ env.WORKING_DIRECTORY }}/macos/build
|
|
~/Library/Developer/Xcode/DerivedData
|
|
key: ${{ runner.os }}-build-${{ env.WORKING_DIRECTORY }}-${{ hashFiles('${{ env.WORKING_DIRECTORY }}/macos/Podfile.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-build-${{ env.WORKING_DIRECTORY }}-
|
|
- name: Build app
|
|
working-directory: ${{ env.WORKING_DIRECTORY }}
|
|
run: yarn macos
|