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 382dc62
Showing 1 changed file with 39 additions and 27 deletions.
66 changes: 39 additions & 27 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,49 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

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

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 y 2>&1

# - 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,12 +67,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: Lint swift
env:
Expand All @@ -79,12 +92,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 +117,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 382dc62

Please sign in to comment.