From 4ce2ebcebc9ff1407e0681310b2b4394a7d64067 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Wed, 7 Feb 2024 12:15:05 +0100 Subject: [PATCH 1/3] :construction_worker: (ci): Run upgrade_tools_and_clean on file changes --- .github/workflows/ci-system-upgrade_tools_and_clean.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-system-upgrade_tools_and_clean.yml b/.github/workflows/ci-system-upgrade_tools_and_clean.yml index 4029d20e5..d9210472a 100644 --- a/.github/workflows/ci-system-upgrade_tools_and_clean.yml +++ b/.github/workflows/ci-system-upgrade_tools_and_clean.yml @@ -7,6 +7,11 @@ name: System - Upgrade tools & clean on: pull_request: types: [labeled] + push: + paths: + - .github/workflows/ci-system-upgrade_tools_and_clean.yml + - .mise.toml + - Gemfile* schedule: # Runs at 3:00 UTC every day - cron: "0 3 * * *" @@ -19,7 +24,8 @@ jobs: upgrade_tools: if: | (github.event_name == 'pull_request' && github.event.label.name == 'ci:upgrade_tools') || - contains(github.event_name, 'schedule') + contains(github.event_name, 'schedule') || + contains(github.event_name, 'push') name: Upgrade tools runs-on: [self-hosted, iOS] From ec0cc95a66e8b97e8263c31bbbabe0e13256733b Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Wed, 7 Feb 2024 12:15:48 +0100 Subject: [PATCH 2/3] :construction_worker: (ci): Add mise uninstall/install tools step --- .../ci-system-upgrade_tools_and_clean.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-system-upgrade_tools_and_clean.yml b/.github/workflows/ci-system-upgrade_tools_and_clean.yml index d9210472a..dc27dc143 100644 --- a/.github/workflows/ci-system-upgrade_tools_and_clean.yml +++ b/.github/workflows/ci-system-upgrade_tools_and_clean.yml @@ -35,11 +35,15 @@ jobs: with: fetch-depth: 1 # shallow clone - - name: Install mise tools - uses: jdx/mise-action@v2 + - name: Setup mise + run: | + echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH - name: Tools' versions before run: | + which mise + mise --version + which xcodebuild xcodebuild -version @@ -64,6 +68,11 @@ jobs: brew upgrade brew cleanup -s --prune=all + - name: Install mise tools + run: | + mise uninstall --all + mise install + - name: Upgrade bundle run: | bundle update --bundler @@ -78,6 +87,9 @@ jobs: - name: Tools' versions after run: | + which mise + mise --version + which xcodebuild xcodebuild -version From 1d83a2a780c5cdae52ba9d980995e54c0e06d45a Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Wed, 7 Feb 2024 12:17:05 +0100 Subject: [PATCH 3/3] :construction_worker: (ci): Mise - replace action by echo >> $GITHUB_PATH --- .github/workflows/ci-fastlane-release_beta_internal.yml | 5 +++-- .github/workflows/ci-linter-swiftformat.yml | 5 +++-- .github/workflows/ci-linter-swiftlint.yml | 5 +++-- .github/workflows/ci-tuist-build.yml | 5 +++-- .github/workflows/ci-tuist-unit_tests.yml | 5 +++-- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci-fastlane-release_beta_internal.yml b/.github/workflows/ci-fastlane-release_beta_internal.yml index 6c2ab29c2..36b575406 100644 --- a/.github/workflows/ci-fastlane-release_beta_internal.yml +++ b/.github/workflows/ci-fastlane-release_beta_internal.yml @@ -37,8 +37,9 @@ jobs: with: fetch-depth: 1 # shallow clone - - name: Install mise tools - uses: jdx/mise-action@v2 + - name: Setup mise + run: | + echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH - name: bundle install run: | diff --git a/.github/workflows/ci-linter-swiftformat.yml b/.github/workflows/ci-linter-swiftformat.yml index 4355e52ba..1c26138e8 100644 --- a/.github/workflows/ci-linter-swiftformat.yml +++ b/.github/workflows/ci-linter-swiftformat.yml @@ -24,8 +24,9 @@ jobs: fetch-depth: 0 # Fetch all history for all branches and tags lfs: true - - name: Install mise tools - uses: jdx/mise-action@v2 + - name: Setup mise + run: | + echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH - name: Run swiftformat run: | diff --git a/.github/workflows/ci-linter-swiftlint.yml b/.github/workflows/ci-linter-swiftlint.yml index 5fb506375..54a9f2674 100644 --- a/.github/workflows/ci-linter-swiftlint.yml +++ b/.github/workflows/ci-linter-swiftlint.yml @@ -24,8 +24,9 @@ jobs: fetch-depth: 0 # Fetch all history for all branches and tags lfs: true - - name: Install mise tools - uses: jdx/mise-action@v2 + - name: Setup mise + run: | + echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH - name: Run swiftlint run: | diff --git a/.github/workflows/ci-tuist-build.yml b/.github/workflows/ci-tuist-build.yml index bc8183184..cc7856aa9 100644 --- a/.github/workflows/ci-tuist-build.yml +++ b/.github/workflows/ci-tuist-build.yml @@ -30,8 +30,9 @@ jobs: fetch-depth: 1 # shallow clone lfs: true - - name: Install mise tools - uses: jdx/mise-action@v2 + - name: Setup mise + run: | + echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH - name: tuist fetch run: | diff --git a/.github/workflows/ci-tuist-unit_tests.yml b/.github/workflows/ci-tuist-unit_tests.yml index 9b4c546e4..afeb06d73 100644 --- a/.github/workflows/ci-tuist-unit_tests.yml +++ b/.github/workflows/ci-tuist-unit_tests.yml @@ -30,8 +30,9 @@ jobs: fetch-depth: 1 # shallow clone lfs: true - - name: Install mise tools - uses: jdx/mise-action@v2 + - name: Setup mise + run: | + echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH - name: tuist fetch run: |