diff --git a/.github/workflows/test-bwa.yml b/.github/workflows/test-bwa.yml index 29f59a8459..7f84a18638 100644 --- a/.github/workflows/test-bwa.yml +++ b/.github/workflows/test-bwa.yml @@ -1,11 +1,10 @@ name: Test Authenticator on: - # push: - # branches: - # - "main" - # - "rc" - # - "hotfix-rc" + push: + branches: + - main + - release/**/* pull_request: types: [opened, synchronize] paths-ignore: @@ -58,10 +57,20 @@ env: _COMPILER_FLAGS: ${{ inputs.compiler-flags }} _GITHUB_ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }} + # xcode optimization flags + COMPILER_INDEX_STORE_ENABLE: "NO" + COMPILATION_CACHE_ENABLE_CACHING: "YES" + COMPILATION_CACHE_ENABLE_PLUGIN: "YES" + SWIFT_ENABLE_COMPILE_CACHE: "YES" + CLANG_ENABLE_COMPILE_CACHE: "YES" + SWIFT_ENABLE_EXPLICIT_MODULES: "YES" + SWIFT_USE_INTEGRATED_DRIVER: "YES" + CLANG_ENABLE_MODULES: "YES" + jobs: test: name: Test - runs-on: macos-26 + runs-on: macos-26-xlarge timeout-minutes: 50 permissions: contents: read @@ -102,22 +111,37 @@ jobs: with: bundler-cache: true - - name: Cache Mint packages - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 + - name: Restore Mint packages + id: restore-mint + uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: path: .mint key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }} restore-keys: | ${{ runner.os }}-mint- - - name: Cache SPM packages - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 + - name: Restore SPM packages + id: restore-spm + uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: path: build/DerivedData/SourcePackages key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} restore-keys: | ${{ runner.os }}-spm- + - name: Restore DerivedData + id: restore-deriveddata + uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 + with: + path: build/DerivedData + key: ${{ runner.os }}-deriveddata-testbwa-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-deriveddata-testbwa- + + # src: https://stackoverflow.com/questions/53753511/is-it-possible-to-copy-an-xcode-derived-data-cache + - name: Set IgnoreFileSystemDeviceInodeChanges flag + run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES + - name: Update local config run: | ./Scripts-bwa/update_test_local_config.sh "${_COMPILER_FLAGS}" @@ -147,9 +171,34 @@ jobs: -destination "platform=iOS Simulator,id=$_SIMULATOR_ID" \ -derivedDataPath build/DerivedData \ -resultBundlePath "$_BUILD_RESULT_BUNDLE_PATH" \ + -parallelizeTargets \ + -skipPackagePluginValidation \ + -skipMacroValidation \ + -showBuildTimingSummary \ -quiet kill "$PYEETD_PID" + - name: Save Mint packages + if: github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.restore-mint.outputs.cache-hit != 'true' + uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 + with: + path: .mint + key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }} + + - name: Save SPM packages + if: github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.restore-spm.outputs.cache-hit != 'true' + uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 + with: + path: build/DerivedData/SourcePackages + key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} + + - name: Save DerivedData + if: github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.restore-deriveddata.outputs.cache-hit != 'true' + uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 + with: + path: build/DerivedData + key: ${{ runner.os }}-deriveddata-testbwa-${{ github.sha }} + - name: Test id: test env: @@ -165,6 +214,7 @@ jobs: -derivedDataPath build/DerivedData \ -test-timeouts-enabled yes \ -maximum-test-execution-time-allowance 2 \ + -showBuildTimingSummary \ -quiet kill "$PYEETD_PID" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 21cb280430..688868384d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,9 +3,8 @@ name: Test Password Manager on: push: branches: - - "main" - - "rc" - - "hotfix-rc" + - main + - release/**/* pull_request: types: [opened, synchronize] paths-ignore: @@ -52,10 +51,20 @@ env: _COMPILER_FLAGS: ${{ inputs.compiler-flags }} _GITHUB_ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }} + # xcode optimization flags + COMPILER_INDEX_STORE_ENABLE: "NO" + COMPILATION_CACHE_ENABLE_CACHING: "YES" + COMPILATION_CACHE_ENABLE_PLUGIN: "YES" + SWIFT_ENABLE_COMPILE_CACHE: "YES" + CLANG_ENABLE_COMPILE_CACHE: "YES" + SWIFT_ENABLE_EXPLICIT_MODULES: "YES" + SWIFT_USE_INTEGRATED_DRIVER: "YES" + CLANG_ENABLE_MODULES: "YES" + jobs: test: name: Test - runs-on: macos-26 + runs-on: macos-26-xlarge timeout-minutes: 50 permissions: contents: read @@ -96,22 +105,37 @@ jobs: with: bundler-cache: true - - name: Cache Mint packages - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 + - name: Restore Mint packages + id: restore-mint + uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: path: .mint key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }} restore-keys: | ${{ runner.os }}-mint- - - name: Cache SPM packages - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 + - name: Restore SPM packages + id: restore-spm + uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: path: build/DerivedData/SourcePackages key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} restore-keys: | ${{ runner.os }}-spm- + - name: Restore DerivedData + id: restore-deriveddata + uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 + with: + path: build/DerivedData + key: ${{ runner.os }}-deriveddata-testbwpm-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-deriveddata-testbwpm- + + # src: https://stackoverflow.com/questions/53753511/is-it-possible-to-copy-an-xcode-derived-data-cache + - name: Set IgnoreFileSystemDeviceInodeChanges flag + run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES + - name: Update local config run: | ./Scripts/update_test_local_config.sh "${_COMPILER_FLAGS}" @@ -141,9 +165,34 @@ jobs: -destination "platform=iOS Simulator,id=$_SIMULATOR_ID" \ -derivedDataPath build/DerivedData \ -resultBundlePath "$_BUILD_RESULT_BUNDLE_PATH" \ + -parallelizeTargets \ + -skipPackagePluginValidation \ + -skipMacroValidation \ + -showBuildTimingSummary \ -quiet kill "$PYEETD_PID" + - name: Save Mint packages + if: github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.restore-mint.outputs.cache-hit != 'true' + uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 + with: + path: .mint + key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }} + + - name: Save SPM packages + if: github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.restore-spm.outputs.cache-hit != 'true' + uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 + with: + path: build/DerivedData/SourcePackages + key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} + + - name: Save DerivedData + if: github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.restore-deriveddata.outputs.cache-hit != 'true' + uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 + with: + path: build/DerivedData + key: ${{ runner.os }}-deriveddata-testbwpm-${{ github.sha }} + - name: Test id: test env: @@ -159,6 +208,7 @@ jobs: -derivedDataPath build/DerivedData \ -test-timeouts-enabled yes \ -maximum-test-execution-time-allowance 3 \ + -showBuildTimingSummary \ -quiet kill "$PYEETD_PID" diff --git a/project-bwa.yml b/project-bwa.yml index 5b1a96481d..e1cd454593 100644 --- a/project-bwa.yml +++ b/project-bwa.yml @@ -111,25 +111,6 @@ targets: - $(SRCROOT)/Authenticator/Application/Support/Settings.bundle/Acknowledgements.plist - $(SRCROOT)/Authenticator/Application/Support/Settings.bundle/Acknowledgements.latest_results.txt - $(SRCROOT)/Authenticator/Application/Support/Settings.bundle/Acknowledgements - postCompileScripts: - - script: | - if [[ ! "$PATH" =~ "/opt/homebrew/bin" ]]; then - PATH="/opt/homebrew/bin:$PATH" - fi - mint run swiftlint - name: Swiftlint - basedOnDependencyAnalysis: false - - script: | - if [[ ! "$PATH" =~ "/opt/homebrew/bin" ]]; then - PATH="/opt/homebrew/bin:$PATH" - fi - mint run swiftformat --lint --lenient . - name: SwiftFormat Lint - basedOnDependencyAnalysis: false - postBuildScripts: - - path: Scripts-bwa/update_settings_version_number.sh - name: "Settings.bundle: Update Version Number" - basedOnDependencyAnalysis: false AuthenticatorTests: type: bundle.unit-test platform: iOS diff --git a/project-bwth.yml b/project-bwth.yml index c0f1fa0873..f6ac6a36d0 100644 --- a/project-bwth.yml +++ b/project-bwth.yml @@ -77,21 +77,6 @@ targets: - target: BitwardenKit/BitwardenKit - target: BitwardenKit/BitwardenResources - target: BitwardenKit/Networking - postCompileScripts: - - script: | - if [[ ! "$PATH" =~ "/opt/homebrew/bin" ]]; then - PATH="/opt/homebrew/bin:$PATH" - fi - mint run swiftlint - name: Swiftlint - basedOnDependencyAnalysis: false - - script: | - if [[ ! "$PATH" =~ "/opt/homebrew/bin" ]]; then - PATH="/opt/homebrew/bin:$PATH" - fi - mint run swiftformat --lint --lenient . - name: SwiftFormat Lint - basedOnDependencyAnalysis: false TestHarnessTests: type: bundle.unit-test platform: iOS diff --git a/project-pm.yml b/project-pm.yml index fafe5afb39..12d111adca 100644 --- a/project-pm.yml +++ b/project-pm.yml @@ -191,25 +191,6 @@ targets: - $(SRCROOT)/Bitwarden/Application/Support/Settings.bundle/Acknowledgements.plist - $(SRCROOT)/Bitwarden/Application/Support/Settings.bundle/Acknowledgements.latest_results.txt - $(SRCROOT)/Bitwarden/Application/Support/Settings.bundle/Acknowledgements - postCompileScripts: - - script: | - if [[ ! "$PATH" =~ "/opt/homebrew/bin" ]]; then - PATH="/opt/homebrew/bin:$PATH" - fi - mint run swiftlint - name: Swiftlint - basedOnDependencyAnalysis: false - - script: | - if [[ ! "$PATH" =~ "/opt/homebrew/bin" ]]; then - PATH="/opt/homebrew/bin:$PATH" - fi - mint run swiftformat --lint --lenient . - name: SwiftFormat Lint - basedOnDependencyAnalysis: false - postBuildScripts: - - path: Scripts/update_settings_version_number.sh - name: "Settings.bundle: Update Version Number" - basedOnDependencyAnalysis: false BitwardenTests: type: bundle.unit-test platform: iOS