From 35f7f02a40a0052ef7ee661c1fc945fb382004d9 Mon Sep 17 00:00:00 2001 From: 417-72KI <417.72ki@gmail.com> Date: Tue, 12 Nov 2024 03:34:06 +0900 Subject: [PATCH 1/4] update matrix to apply policy-update --- .github/workflows/ci.yml | 117 ++++++++++----------------------------- 1 file changed, 28 insertions(+), 89 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01a23bfe..65f53fce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,13 +12,19 @@ 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 @@ -50,52 +56,17 @@ 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 @@ -169,13 +140,19 @@ 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 @@ -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: ${{ runner.os == 'macos-13' }} - run: make install PREFIX='/opt/homebrew' + if: ${{ runner.os != 'macos-13' }} - run: rm -rf .build && rm -rf Package.swift From c5185777ca353e2addbd7a4f735cfefb3738ea2a Mon Sep 17 00:00:00 2001 From: 417-72KI <417.72ki@gmail.com> Date: Tue, 12 Nov 2024 03:34:25 +0900 Subject: [PATCH 2/4] update `actions/cache` --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65f53fce..99d944d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: - uses: actions/checkout@v4 - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | .build/artifacts @@ -71,7 +71,7 @@ jobs: - uses: actions/checkout@v4 - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | .build/artifacts @@ -113,7 +113,7 @@ jobs: - uses: actions/setup-node@v2 - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | .build/artifacts @@ -157,7 +157,7 @@ jobs: - uses: actions/checkout@v4 - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | .build/artifacts @@ -202,7 +202,7 @@ jobs: - uses: actions/setup-node@v2 - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | .build/artifacts From 8b7bb4771344b1c1b26368ce17eb9a4f45624890 Mon Sep 17 00:00:00 2001 From: 417-72KI <417.72ki@gmail.com> Date: Tue, 12 Nov 2024 03:34:47 +0900 Subject: [PATCH 3/4] update `actions/setup-node` --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99d944d7..e7752435 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -110,7 +110,7 @@ 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@v4 @@ -199,7 +199,7 @@ 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@v4 From 8c0ac33ae9595fe021e24e9f08391d86408bcc00 Mon Sep 17 00:00:00 2001 From: 417-72KI <417.72ki@gmail.com> Date: Tue, 12 Nov 2024 03:34:47 +0900 Subject: [PATCH 4/4] fix condition for `make install` --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7752435..35240731 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -179,9 +179,9 @@ jobs: run: brew install danger/tap/danger-js - run: make install - if: ${{ runner.os == 'macos-13' }} + if: ${{ matrix.runner == 'macos-13' }} - run: make install PREFIX='/opt/homebrew' - if: ${{ runner.os != 'macos-13' }} + if: ${{ matrix.runner != 'macos-13' }} - run: rm -rf .build && rm -rf Package.swift