Skip to content

Commit

Permalink
split matrix with whole jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
417-72KI committed Sep 1, 2024
1 parent 7390f7d commit d432a10
Showing 1 changed file with 80 additions and 9 deletions.
89 changes: 80 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,51 @@ concurrency:
cancel-in-progress: true

jobs:
test-on-macos-13:
name: Test on macOS 13
runs-on: macOS-13
strategy:
fail-fast: false
matrix:
xcode: ["14.3.1"]
steps:
- uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
.build/artifacts
.build/checkouts
.build/repositories
key: ${{ runner.os }}-dependencies-${{ matrix.xcode }}-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-dependencies-${{ matrix.xcode }}-${{ hashFiles('**/Package.resolved') }}
${{ runner.os }}-dependencies-${{ matrix.xcode }}-
- name: Select Xcode
run: |
xcodebuild -version
ls -nt /Applications/ | grep "Xcode*"
sudo xcode-select -switch /Applications/Xcode_${{ matrix.xcode }}.app
xcodebuild -version
- name: Install danger-js
run: brew install danger/tap/danger-js

- run: swift test

- run: swift run danger-swift ci --verbose --failOnErrors
if: ${{ github.event_name == 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test-on-macos-14:
name: Test on macOS 14
runs-on: macOS-14
strategy:
fail-fast: false
matrix:
xcode: ["14.3.1", "15.2", "15.4"]
xcode: ["15.2", "15.4"]
steps:
- uses: actions/checkout@v2

Expand All @@ -43,8 +81,6 @@ jobs:
- name: Install danger-js
run: brew install danger/tap/danger-js
env:
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer # Avoid Homebrew installation error

- run: swift test

Expand All @@ -59,7 +95,7 @@ jobs:
strategy:
fail-fast: false
matrix:
xcode: ["14.3.1", "15.2", "15.4"]
xcode: ["15.2", "15.4"]
steps:
- uses: actions/checkout@v2

Expand All @@ -84,8 +120,6 @@ jobs:
- name: Install danger-js
run: brew install danger/tap/danger-js
env:
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer # Avoid Homebrew installation error

- run: sudo make install

Expand Down Expand Up @@ -135,13 +169,52 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

test-without-spm-on-macos-13:
name: Test without SPM on macOS 13
runs-on: macOS-13
strategy:
fail-fast: false
matrix:
xcode: ["14.3.1"]
steps:
- uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
.build/artifacts
.build/checkouts
.build/repositories
key: ${{ runner.os }}-without-spm-package-${{ matrix.xcode }}-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-without-spm-package-${{ matrix.xcode }}-${{ hashFiles('**/Package.resolved') }}
${{ runner.os }}-without-spm-package-${{ matrix.xcode }}-
- name: Select Xcode
run: |
xcodebuild -version
ls -nt /Applications/ | grep "Xcode*"
sudo xcode-select -switch /Applications/Xcode_${{ matrix.xcode }}.app
xcodebuild -version
- name: Install danger-js
run: brew install danger/tap/danger-js

- run: sudo make install

- run: danger-swift ci --verbose --failOnErrors
if: ${{ github.event_name == 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

test-without-spm-on-macos-14:
name: Test without SPM on macOS 14
runs-on: macOS-14
strategy:
fail-fast: false
matrix:
xcode: ["14.3.1", "15.2", "15.4"]
xcode: ["15.2", "15.4"]
steps:
- uses: actions/checkout@v2

Expand All @@ -166,8 +239,6 @@ jobs:
- name: Install danger-js
run: brew install danger/tap/danger-js
env:
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer # Avoid Homebrew installation error

- run: sudo make install

Expand Down

0 comments on commit d432a10

Please sign in to comment.