Skip to content

feat(CI): Update workflow #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "InterceptionMacrosPluginTests"
BuildableName = "InterceptionMacrosPluginTests"
BlueprintName = "InterceptionMacrosPluginTests"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
Expand Down Expand Up @@ -42,6 +58,15 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "InterceptionMacrosPluginTests"
BuildableName = "InterceptionMacrosPluginTests"
BlueprintName = "InterceptionMacrosPluginTests"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "InterceptionMacrosTests"
BuildableName = "InterceptionMacrosTests"
BlueprintName = "InterceptionMacrosTests"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
Expand Down Expand Up @@ -42,6 +58,15 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "InterceptionMacrosTests"
BuildableName = "InterceptionMacrosTests"
BlueprintName = "InterceptionMacrosTests"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "InterceptionTests"
BuildableName = "InterceptionTests"
BlueprintName = "InterceptionTests"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
Expand Down Expand Up @@ -42,6 +58,15 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "InterceptionTests"
BuildableName = "InterceptionTests"
BlueprintName = "InterceptionTests"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
131 changes: 119 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,135 @@ on:
pull_request:
branches:
- '*'
workflow_dispatch:

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
library-swift-latest:
name: Library
test-library:
name: test-library
if: |
!contains(github.event.head_commit.message, '[ci skip]') &&
!contains(github.event.head_commit.message, '[ci skip test]') &&
!contains(github.event.head_commit.message, '[ci skip library-swift-latest]')
runs-on: macos-13
timeout-minutes: 30
runs-on: macos-14
strategy:
fail-fast: false
matrix:
config:
- debug
- release
platform: [iOS, macOS, tvOS, watchOS, macCatalyst]
xcode: ['15.4', '16.1']
config: [Debug]
command: [test]
scheme: [Interception]
steps:
- uses: actions/checkout@v4
- name: Select Xcode 15.2
run: sudo xcode-select -s /Applications/Xcode_15.2.app
- name: Run test
run: make test
- uses: actions/checkout@v4
with:
submodules: true
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Cache derived data
uses: actions/cache@v3
with:
path: |
~/.derivedData
key: |
deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }}
restore-keys: |
deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-
- name: Set IgnoreFileSystemDeviceInodeChanges flag
run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
- name: Update mtime for incremental builds
uses: chetan/git-restore-mtime-action@v2
- name: test-library (${{ matrix.config }})
uses: capturecontext/[email protected]
with:
command: xcodebuild
subcommand: ${{ matrix.command }}
platform: ${{ matrix.platform }}
scheme: ${{ matrix.scheme }}
config: ${{ matrix.config }}
test-library-macros:
name: test-library-macros
if: |
!contains(github.event.head_commit.message, '[ci skip]') &&
!contains(github.event.head_commit.message, '[ci skip test]') &&
!contains(github.event.head_commit.message, '[ci skip library-swift-latest]')
runs-on: macos-14
strategy:
fail-fast: false
matrix:
platform: [iOS, macOS, tvOS, watchOS, macCatalyst]
xcode: ['15.4', '16.1']
config: [Debug]
command: [test]
scheme: [Interception]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Cache derived data
uses: actions/cache@v3
with:
path: |
~/.derivedData
key: |
deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }}
restore-keys: |
deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-
- name: Set IgnoreFileSystemDeviceInodeChanges flag
run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
- name: Update mtime for incremental builds
uses: chetan/git-restore-mtime-action@v2
- name: test-library-macros (${{ matrix.config }})
uses: capturecontext/[email protected]
with:
command: xcodebuild-macros
subcommand: ${{ matrix.command }}
platform: ${{ matrix.platform }}
scheme: ${{ matrix.scheme }}
config: ${{ matrix.config }}
test-library-macros-plugin:
name: test-library-macros-plugin
if: |
!contains(github.event.head_commit.message, '[ci skip]') &&
!contains(github.event.head_commit.message, '[ci skip test]') &&
!contains(github.event.head_commit.message, '[ci skip library-swift-latest]')
runs-on: macos-14
strategy:
matrix:
platform: [macOS]
xcode: ['16.1']
command: [test]
config: [Debug]
scheme: [Interception]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Cache derived data
uses: actions/cache@v3
with:
path: |
~/.derivedData
key: |
deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }}
restore-keys: |
deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-
- name: Set IgnoreFileSystemDeviceInodeChanges flag
run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
- name: Update mtime for incremental builds
uses: chetan/git-restore-mtime-action@v2
- name: test-library-macros-plugin (${{ matrix.config }})
uses: capturecontext/[email protected]
with:
command: xcodebuild-macros-plugin
subcommand: ${{ matrix.command }}
platform: ${{ matrix.platform }}
scheme: ${{ matrix.scheme }}
config: ${{ matrix.config }}
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "swift-package-action"]
path = swift-package-action
url = [email protected]:capturecontext/swift-package-action.git
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "InterceptionMacrosPluginTests"
BuildableName = "InterceptionMacrosPluginTests"
BlueprintName = "InterceptionMacrosPluginTests"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
Expand Down Expand Up @@ -42,6 +58,15 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "InterceptionMacrosPluginTests"
BuildableName = "InterceptionMacrosPluginTests"
BlueprintName = "InterceptionMacrosPluginTests"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "InterceptionMacrosTests"
BuildableName = "InterceptionMacrosTests"
BlueprintName = "InterceptionMacrosTests"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
Expand Down Expand Up @@ -42,6 +58,15 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "InterceptionMacrosTests"
BuildableName = "InterceptionMacrosTests"
BlueprintName = "InterceptionMacrosTests"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
25 changes: 25 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/InterceptionTests.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "InterceptionTests"
BuildableName = "InterceptionTests"
BlueprintName = "InterceptionTests"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
Expand Down Expand Up @@ -42,6 +58,15 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "InterceptionTests"
BuildableName = "InterceptionTests"
BlueprintName = "InterceptionTests"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
Loading
Loading