Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 60 additions & 10 deletions .github/workflows/test-bwa.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}"
Expand Down Expand Up @@ -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:
Expand All @@ -165,6 +214,7 @@ jobs:
-derivedDataPath build/DerivedData \
-test-timeouts-enabled yes \
-maximum-test-execution-time-allowance 2 \
-showBuildTimingSummary \
-quiet
kill "$PYEETD_PID"

Expand Down
66 changes: 58 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ name: Test Password Manager
on:
push:
branches:
- "main"
- "rc"
- "hotfix-rc"
- main
- release/**/*
pull_request:
types: [opened, synchronize]
paths-ignore:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}"
Expand Down Expand Up @@ -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:
Expand All @@ -159,6 +208,7 @@ jobs:
-derivedDataPath build/DerivedData \
-test-timeouts-enabled yes \
-maximum-test-execution-time-allowance 3 \
-showBuildTimingSummary \
-quiet
kill "$PYEETD_PID"

Expand Down
19 changes: 0 additions & 19 deletions project-bwa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 0 additions & 15 deletions project-bwth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 0 additions & 19 deletions project-pm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading