Skip to content

Commit

Permalink
Update CI execution environment (#71)
Browse files Browse the repository at this point in the history
* Update Danger execution environment to macOS13

* Update swift build execution environment to macOS13

* Update xcode build execution environment to macOS13

* Update minimum deployment target to macOS 10.13

* Update Magnet.framework v3.4.0

* Update dependency gems
  • Loading branch information
Econa77 authored Oct 13, 2023
1 parent 66cd7ef commit c5bce19
Show file tree
Hide file tree
Showing 12 changed files with 138 additions and 139 deletions.
66 changes: 21 additions & 45 deletions .github/workflows/Danger.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,41 @@
name: Danger

on: pull_request

on:
pull_request:
push:
branches:
- master
jobs:
danger:
runs-on: macos-latest
runs-on: macos-13
# https://github.com/danger/danger/issues/1103
if: (github.event.pull_request.head.repo.fork == false)
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Setup ruby
uses: actions/setup-ruby@v1
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'

- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_11.4.app

- name: Cache RubyGems
uses: actions/cache@v1
ruby-version: '3.2'
bundler-cache: true
- name: Cache Mint
uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
path: .mint
key: ${{ runner.os }}-mint-${{ env.SWIFTLINT_VERSION }}
restore-keys: |
${{ runner.os }}-gem-
- name: Cache Mint Builds
uses: actions/cache@v1
with:
path: ${{ env.MINT_PATH }}
key: ${{ runner.os }}-mint-build-${{ env.SWIFTLINT_VERSION }}
restore-keys: |
${{ runner.os }}-mint-build-
- name: Cache Mint Links
uses: actions/cache@v1
with:
path: ${{ env.MINT_LINK_PATH }}
key: ${{ runner.os }}-mint-link-${{ env.SWIFTLINT_VERSION }}
restore-keys: |
${{ runner.os }}-mint-link-
- name: Bundle install
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
${{ runner.os }}-mint-
- name: Install Mint and Packages
run: |
brew install mint
mint install realm/SwiftLint@${{ env.SWIFTLINT_VERSION }}
- name: Run Danger
run: bundle exec danger
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

env:
MINT_PATH: ${{ github.workspace }}/mint
MINT_LINK_PATH: ${{ github.workspace }}/mint/bin
SWIFTLINT_VERSION: 0.39.1
MINT_PATH: .mint/lib
MINT_LINK_PATH: .mint/bin
SWIFTLINT_VERSION: 0.53.0
DEVELOPER_DIR: /Applications/Xcode_15.0.app/Contents/Developer
20 changes: 12 additions & 8 deletions .github/workflows/Swift-Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@ name: Swift-Build
on: [push, pull_request]
jobs:
test:
runs-on: macos-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-12, macos-13]
xcode: ['14.2', '15.0']
exclude:
- os: macos-12
xcode: '15.0'
env:
DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Xcode select
run: sudo xcode-select -s /Applications/Xcode_11.4.app

- name: Build and Test
run: |
swift test
run: swift test
19 changes: 11 additions & 8 deletions .github/workflows/Xcode-Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,30 @@ name: Xcode-Build
on: [push, pull_request]
jobs:
test:
runs-on: macos-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-12, macos-13]
xcode: ['14.2', '15.0']
exclude:
- os: macos-12
xcode: '15.0'
env:
DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Xcode select
run: sudo xcode-select -s /Applications/Xcode_11.4.app

- name: Build and Test
run: |
set -o pipefail
xcodebuild build-for-testing test-without-building \
-workspace "$PROJECT" \
-scheme "$SCHEME" \
-sdk "$SDK" \
-destination "$DESTINATION" \
-configuration Debug \
ENABLE_TESTABILITY=YES | xcpretty -c;
env:
PROJECT: KeyHolder.xcworkspace
SCHEME: KeyHolder
SDK: macosx
DESTINATION: arch=x86_64
4 changes: 2 additions & 2 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "Clipy/Magnet" "v3.3.0"
github "Clipy/Sauce" "v2.2.0"
github "Clipy/Magnet" "v3.4.0"
github "Clipy/Sauce" "v2.4.0"
2 changes: 1 addition & 1 deletion Dangerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github.dismiss_out_of_range_messages
swiftlint.config_file = '.swiftlint.yml'
swiftlint.binary_path = './mint/bin/swiftlint'
swiftlint.binary_path = '.mint/bin/swiftlint'
swiftlint.lint_files(inline_mode: true)
4 changes: 2 additions & 2 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
Expand Down Expand Up @@ -331,7 +331,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand Down
Loading

0 comments on commit c5bce19

Please sign in to comment.