Skip to content

mathieu/feature/Add favorites management #228

mathieu/feature/Add favorites management

mathieu/feature/Add favorites management #228

# Leka - iOS Monorepo
# Copyright APF France handicap
# SPDX-License-Identifier: Apache-2.0
name: Tuist - Build (GitHub Hosted)
on:
push:
branches:
- develop
paths:
- "**/*.swift"
- ".mise.toml"
pull_request:
types: [opened, synchronize, reopened]
paths:
- "**/*.swift"
- ".mise.toml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
TUIST_TURN_OFF_LINTERS: TRUE
TUIST_GENERATE_EXAMPLE_TARGETS: TRUE
TUIST_GENERATE_MODULES_AS_FRAMEWORKS_FOR_DEBUG: FALSE
jobs:
build:
name: build
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
TUIST_DEVELOPER_MODE: [TRUE, FALSE]
permissions:
actions: write
pull-requests: write
steps:
- name: Collect Workflow Telemetry
uses: catchpoint/workflow-telemetry-action@v2
with:
comment_on_pr: false
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Setup mise
uses: jdx/mise-action@v2
with:
version: 2025.1.7
install: true
cache: true
- name: tuist version
run: |
which tuist
tuist version
- name: Cache Xcode derived data
id: xcode_cache
uses: irgaly/xcode-cache@v1
with:
key: xcode_cache-tuist_build_github_hosted-DEVELOPER_MODE_${{ matrix.TUIST_DEVELOPER_MODE }}-${{ github.sha }}
restore-keys: |
xcode_cache-tuist_build_github_hosted-DEVELOPER_MODE_${{ matrix.TUIST_DEVELOPER_MODE }}-
xcode_cache-tuist_build_github_hosted-
delete-used-deriveddata-cache: true
swiftpm-package-resolved-file: Tuist/Package.resolved
use-default-mtime-targets: true
restore-mtime-targets: |
**/*.bin
**/*.gif
**/*.jpeg
**/*.jpg
**/*.mid
**/*.mp3
**/*.pdf
**/*.png
**/*.svg
**/*.wav
**/*.json
**/*.xcstrings
**/*.mp4
**/*.yml
- name: Cache SPM data
uses: actions/cache@v4
with:
path: |
~/Library/Caches/org.swift.swiftpm
~/Library/org.swift.swiftpm
key: spm_cache-tuist_build_github_hosted-DEVELOPER_MODE_${{ matrix.TUIST_DEVELOPER_MODE }}-${{ github.sha }}
restore-keys: |
spm_cache-tuist_build_github_hosted-DEVELOPER_MODE_${{ matrix.TUIST_DEVELOPER_MODE }}-
spm_cache-tuist_build_github_hosted-
spm_cache-
- name: Cache tuist data
id: tuist_cache
uses: actions/cache@v4
with:
path: |
Tuist/.build/artifacts
Tuist/.build/checkouts
Tuist/.build/derived
Tuist/.build/workspace-state.json
key: tuist_cache-tuist_build_github_hosted-DEVELOPER_MODE_${{ matrix.TUIST_DEVELOPER_MODE }}-${{ github.sha }}
restore-keys: |
tuist_cache-tuist_build_github_hosted-DEVELOPER_MODE_${{ matrix.TUIST_DEVELOPER_MODE }}-
tuist_cache-tuist_build_github_hosted-
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
- name: Clean on tuist upgrade or package.resolved change
if: ${{ contains(steps.changed-files.outputs.modified_files, 'Tuist/Package.resolved') || contains(steps.changed-files.outputs.modified_files, '.mise.toml') }}
run: |
tuist clean
rm -rf .build
rm -rf Tuist/.build
rm -rf ~/Library/Developer/Xcode/DerivedData
- name: restore files' mtime
uses: chetan/git-restore-mtime-action@v2
- name: Config Xcode
run: |
xcodes select 16.1
defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES
- name: tuist install
run: |
TUIST_TURN_OFF_LINTERS=${{ env.TUIST_TURN_OFF_LINTERS }} \
TUIST_GENERATE_EXAMPLE_TARGETS=${{ env.TUIST_GENERATE_EXAMPLE_TARGETS }} \
TUIST_GENERATE_MODULES_AS_FRAMEWORKS_FOR_DEBUG=${{ env.TUIST_GENERATE_MODULES_AS_FRAMEWORKS_FOR_DEBUG }} \
TUIST_DEVELOPER_MODE=${{ matrix.TUIST_DEVELOPER_MODE }} \
tuist install
- name: tuist generate
run: |
TUIST_TURN_OFF_LINTERS=${{ env.TUIST_TURN_OFF_LINTERS }} \
TUIST_GENERATE_EXAMPLE_TARGETS=${{ env.TUIST_GENERATE_EXAMPLE_TARGETS }} \
TUIST_GENERATE_MODULES_AS_FRAMEWORKS_FOR_DEBUG=${{ env.TUIST_GENERATE_MODULES_AS_FRAMEWORKS_FOR_DEBUG }} \
TUIST_DEVELOPER_MODE=${{ matrix.TUIST_DEVELOPER_MODE }} \
tuist generate --no-open
- name: tuist build
run: |
TUIST_TURN_OFF_LINTERS=${{ env.TUIST_TURN_OFF_LINTERS }} \
TUIST_GENERATE_EXAMPLE_TARGETS=${{ env.TUIST_GENERATE_EXAMPLE_TARGETS }} \
TUIST_GENERATE_MODULES_AS_FRAMEWORKS_FOR_DEBUG=${{ env.TUIST_GENERATE_MODULES_AS_FRAMEWORKS_FOR_DEBUG }} \
TUIST_DEVELOPER_MODE=${{ matrix.TUIST_DEVELOPER_MODE }} \
tuist build