Skip to content

Commit

Permalink
Merge pull request #632 from 417-72KI/fix-macos-runner
Browse files Browse the repository at this point in the history
  • Loading branch information
f-meloni authored Nov 12, 2024
2 parents 51bffb0 + 8c0ac33 commit 808ad84
Showing 1 changed file with 35 additions and 96 deletions.
131 changes: 35 additions & 96 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,24 @@ concurrency:
cancel-in-progress: true

jobs:
test-on-macos-13:
name: Test on macOS 13
runs-on: macOS-13
test-on-macos:
name: Test on macOS
strategy:
fail-fast: false
matrix:
xcode: ["14.3.1"]
include:
- runner: "macos-13"
xcode: "14.3.1"
- runner: "macos-14"
xcode: "15.4"
- runner: "macos-15"
xcode: "16.1"
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
.build/artifacts
Expand All @@ -50,57 +56,22 @@ jobs:
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: ["15.4", "16.0"]
steps:
- uses: actions/checkout@v4

- 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-dependencies-resolver:
name: Test dependencies resolver
runs-on: macOS-14
strategy:
fail-fast: false
matrix:
xcode: ["15.4", "16.0"]
include:
- runner: "macos-14"
xcode: "15.4"
- runner: "macos-15"
xcode: "16.1"
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
.build/artifacts
Expand Down Expand Up @@ -139,10 +110,10 @@ jobs:
swift: ["5.9", "5.10", "6.0"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
.build/artifacts
Expand All @@ -169,18 +140,24 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

test-without-spm-on-macos-13:
name: Test without SPM on macOS 13
runs-on: macOS-13
test-without-spm-on-macos:
name: Test without SPM on macOS
strategy:
fail-fast: false
matrix:
xcode: ["14.3.1"]
include:
- runner: "macos-13"
xcode: "14.3.1"
- runner: "macos-14"
xcode: "15.4"
- runner: "macos-15"
xcode: "16.1"
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
.build/artifacts
Expand All @@ -202,47 +179,9 @@ jobs:
run: brew install danger/tap/danger-js

- run: make install

- run: rm -rf .build && rm -rf Package.swift

- 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: ["15.4", "16.0"]
steps:
- uses: actions/checkout@v4

- 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

if: ${{ matrix.runner == 'macos-13' }}
- run: make install PREFIX='/opt/homebrew'
if: ${{ matrix.runner != 'macos-13' }}

- run: rm -rf .build && rm -rf Package.swift

Expand All @@ -260,10 +199,10 @@ jobs:
swift: ["5.9", "5.10", "6.0"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
.build/artifacts
Expand Down

0 comments on commit 808ad84

Please sign in to comment.