Skip to content

Commit

Permalink
Update CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kdubb committed Nov 2, 2024
1 parent 9e3488b commit 097a89f
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 27 deletions.
31 changes: 18 additions & 13 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,33 @@ on:
jobs:

check-build-test:
runs-on: macos-12
runs-on: macos-15

steps:

- name: Install Tools
run: |
brew tap a7ex/homebrew-formulae
brew install xcbeautify sonar-scanner findsimulator
brew install swiftlint sonar-scanner
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer
run: sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer

- uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}-${{ env.MD_APPLE_SDK_ROOT }}-spm-${{ hashFiles('./Package.resolved') }}
restore-keys: |
${{ runner.os }}-${{ env.MD_APPLE_SDK_ROOT }}-spm-
- name: SwiftLint
run: |
mkdir .build
mkdir -p .build
swiftlint lint --reporter json > .build/swiftlint.json
- name: Build/Test
Expand All @@ -39,7 +45,7 @@ jobs:
- name: Convert Coverage
run: xcrun llvm-cov show -instr-profile=.build/debug/codecov/default.profdata .build/debug/SundayPackageTests.xctest/Contents/MacOS/SundayPackageTests > .build/coverage.report

- name: Sonar Scanner
- name: SonarCloud Scan
run: sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -48,7 +54,7 @@ jobs:

build-test:

runs-on: macos-12
runs-on: macos-15

needs: [check-build-test]

Expand All @@ -60,21 +66,20 @@ jobs:

- name: Install Tools
run: |
brew tap a7ex/homebrew-formulae
brew install xcbeautify findsimulator
brew install xcbeautify
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer
run: sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer

- name: Build/Test
run: make build-test-${{ matrix.platform }}

- name: Report Test Results
uses: kishikawakatsumi/xcresulttool@v1
uses: slidoapp/xcresulttool@main
if: always()
with:
title: Test Results ${{ matrix.platform }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:

build:

runs-on: macos-12
runs-on: macos-15

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer
run: sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer

- run: mkdir -p docs

Expand All @@ -39,7 +39,7 @@ jobs:
run: tar -czf docs.tar.gz docs

- name: Upload Docs Archive
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: docs-${{ github.ref_name }}
path: docs.tar.gz
Expand All @@ -50,10 +50,10 @@ jobs:
needs: [ build ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download Docs Archive
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: docs-${{ github.ref_name }}
path: '.'
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:

build:

runs-on: macos-12
runs-on: macos-15

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer
run: sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer

- run: mkdir -p docs

Expand All @@ -39,7 +39,7 @@ jobs:
run: tar -czf docs.tar.gz docs

- name: Upload Docs Archive
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: docs-${{ github.ref_name }}
path: docs.tar.gz
Expand All @@ -50,10 +50,10 @@ jobs:
needs: [ build ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download Docs Archive
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: docs-${{ github.ref_name }}
path: '.'
Expand All @@ -69,10 +69,10 @@ jobs:

- name: Check Version Format in Tag
id: version
uses: nowsprinting/check-version-format-action@v3
uses: nowsprinting/check-version-format-action@v4

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down

0 comments on commit 097a89f

Please sign in to comment.