Skip to content

Commit

Permalink
ci: fix
Browse files Browse the repository at this point in the history
Signed-off-by: Alessandro Yuichi Okimoto <yuichijpn@gmail.com>
  • Loading branch information
cre8ivejp committed Apr 4, 2024
1 parent 8034092 commit 39b9d11
Showing 1 changed file with 41 additions and 28 deletions.
69 changes: 41 additions & 28 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,50 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
MINT_PATH: ${{ github.workspace }}/mint
MINT_LINK_PATH: ${{ github.workspace }}/mint/bin

jobs:
install-mint:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3

- name: Cache Mint packages
uses: actions/cache@v4
with:
path: ${{ env.MINT_PATH }}
key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}
restore-keys: ${{ runner.os }}-mint-

- name: Install mint
run: |
brew install mint
- name: restore Mint packages
id: cache-restore
uses: actions/cache/restore@v3
with:
path: .mint
key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}

- name: Bootstrap mint
env:
CI: true
run: make bootstrap-mint

- name: Cache Mint packages
uses: actions/cache@v3
with:
path: .mint
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
restore-keys: |
${{ runner.os }}-mint-
run: mint bootstrap --link --overwrite yes

# - name: Restore Mint packages
# id: cache-restore
# uses: actions/cache/restore@v3
# with:
# path: .mint
# key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}

# - name: Bootstrap mint
# if: ${{ steps.mint-cache.outputs.cache-hit != 'true' }}
# env:
# CI: true
# run: make bootstrap-mint

# - name: Cache Mint packages
# uses: actions/cache@v3
# with:
# path: .mint
# key: ${{ steps.cache-restore.outputs.cache-primary-key }}
# restore-keys: |
# ${{ runner.os }}-mint-

lint_swift:
needs: install-mint
Expand All @@ -53,17 +68,16 @@ jobs:
- uses: actions/checkout@v3

- name: Cache Mint packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .mint
path: ${{ env.MINT_PATH }}
key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}
restore-keys: |
${{ runner.os }}-mint-
restore-keys: ${{ runner.os }}-mint-

- name: Lint swift
env:
CI: true
run: make run-lint
run: mint run swiftlint

lint_pod:
runs-on: macos-latest
Expand All @@ -79,12 +93,11 @@ jobs:
- uses: actions/checkout@v3

- name: Cache Mint packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .mint
path: ${{ env.MINT_PATH }}
key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}
restore-keys: |
${{ runner.os }}-mint-
restore-keys: ${{ runner.os }}-mint-

- name: Generate XcodeProject
env:
Expand All @@ -105,7 +118,7 @@ jobs:

build:
needs: generate-xcodeProject
runs-on: macos-latest
runs-on: macos-13-xlarge
steps:
- uses: actions/checkout@v3

Expand Down

0 comments on commit 39b9d11

Please sign in to comment.