summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
authorSteffen Ernst <steffen.ernst@mullvad.net>2025-05-13 09:02:08 +0200
committerBug Magnet <marco.nikic@mullvad.net>2025-05-26 16:27:43 +0200
commit119926e1bf8f71262c2841f3da37123e81e602b3 (patch)
tree1b7a774b699e78a44f61f2b2c6ccf6a3cd200737 /.github/workflows
parenta41a136cd715d9eaa96af81bbbebbb5f37c80a25 (diff)
downloadmullvadvpn-119926e1bf8f71262c2841f3da37123e81e602b3.tar.xz
mullvadvpn-119926e1bf8f71262c2841f3da37123e81e602b3.zip
Refactor ios github actions
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ios-end-to-end-tests.yml4
-rw-r--r--.github/workflows/ios-screenshots-creation.yml30
-rw-r--r--.github/workflows/ios-screenshots-tests.yml43
-rw-r--r--.github/workflows/ios-validate-build-schemas.yml50
-rw-r--r--.github/workflows/ios.yml58
5 files changed, 19 insertions, 166 deletions
diff --git a/.github/workflows/ios-end-to-end-tests.yml b/.github/workflows/ios-end-to-end-tests.yml
index 496b8bb58c..8c9a8d13d0 100644
--- a/.github/workflows/ios-end-to-end-tests.yml
+++ b/.github/workflows/ios-end-to-end-tests.yml
@@ -107,7 +107,7 @@ jobs:
run: rustup target add aarch64-apple-ios
- name: Build iOS end to end tests action
- uses: ./.github/actions/build-ios-e2e-tests
+ uses: ./.github/actions/ios/build-ios-e2e-tests
with:
test_name: ${{ github.event.inputs.user_supplied_test_name }}
ios_device_pin_code: ${{ secrets.IOS_DEVICE_PIN_CODE }}
@@ -149,7 +149,7 @@ jobs:
test_suite: ${{fromJson(needs.define-test-suites-matrix.outputs.test_suites_json)}}
steps:
- name: Run iOS end to end tests action
- uses: ./.github/actions/run-ios-e2e-tests
+ uses: ./.github/actions/ios/run-ios-e2e-tests
with:
test_name: "MullvadVPNUITests/${{ matrix.test_suite }}"
test_device_udid: ${{ env.TEST_DEVICE_UDID }}
diff --git a/.github/workflows/ios-screenshots-creation.yml b/.github/workflows/ios-screenshots-creation.yml
index 289d0278e5..3e0e387e27 100644
--- a/.github/workflows/ios-screenshots-creation.yml
+++ b/.github/workflows/ios-screenshots-creation.yml
@@ -19,30 +19,15 @@ jobs:
env:
SOURCE_PACKAGES_PATH: .spm
TEST_ACCOUNT: ${{ secrets.IOS_TEST_ACCOUNT_NUMBER }}
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
-
- - name: Checkout submodules
- run: |
- git config --global --add safe.directory '*'
- git submodule update --init --recursive ios/wireguard-apple
-
- - name: Setup go-lang
- uses: actions/setup-go@v3
- with:
- go-version: 1.21.13
- - name: Configure Xcode
- uses: maxim-lobanov/setup-xcode@v1
+ steps:
+ - name: Setup project
+ uses: ./.github/actions/ios/setup-project-toolchain
with:
- xcode-version: '16.1'
- - name: Configure Rust
- run: rustup target add aarch64-apple-ios-sim x86_64-apple-ios
+ ios_rust_target: aarch64-apple-ios-sim
- - name: Configure Xcode project
+ - name: Add test account to config
run: |
- for file in *.xcconfig.template ; do cp $file ${file//.template/} ; done
sed -i "" \
"/HAS_TIME_ACCOUNT_NUMBER =/ s#= .*#= 1234123412341234#" \
UITests.xcconfig
@@ -52,11 +37,6 @@ jobs:
run: bundle install
working-directory: ios
- - name: Install protobuf
- run: |
- brew update
- brew install protobuf
-
- name: Create screenshots
run: bundle exec fastlane snapshot --cloned_source_packages_path "$SOURCE_PACKAGES_PATH"
working-directory: ios
diff --git a/.github/workflows/ios-screenshots-tests.yml b/.github/workflows/ios-screenshots-tests.yml
index 74589e8f0a..7c0311f8ac 100644
--- a/.github/workflows/ios-screenshots-tests.yml
+++ b/.github/workflows/ios-screenshots-tests.yml
@@ -23,38 +23,15 @@ jobs:
env:
SOURCE_PACKAGES_PATH: .spm
TEST_ACCOUNT: ${{ secrets.IOS_TEST_ACCOUNT_NUMBER }}
+
steps:
- - name: Checkout repository
- uses: actions/checkout@v4
-
- - name: Checkout submodules
- run: |
- git config --global --add safe.directory '*'
- git submodule update --init --recursive ios/wireguard-apple
-
- - name: Configure cache
- uses: actions/cache@v3
- with:
- path: ios/${{ env.SOURCE_PACKAGES_PATH }}
- key: ${{ runner.os }}-spm-${{ hashFiles('ios/**/Package.resolved') }}
- restore-keys: |
- ${{ runner.os }}-spm-
-
- - name: Setup go-lang
- uses: actions/setup-go@v3
- with:
- go-version: 1.21.13
-
- - name: Configure Xcode
- uses: maxim-lobanov/setup-xcode@v1
+ - name: Setup project
+ uses: ./.github/actions/ios/setup-project-toolchain
with:
- xcode-version: '16.1'
- - name: Configure Rust
- run: rustup target add aarch64-apple-ios-sim
+ ios_rust_target: aarch64-apple-ios-sim
- - name: Configure Xcode project
+ - name: Add test account to config
run: |
- for file in *.xcconfig.template ; do cp $file ${file//.template/} ; done
sed -i "" \
"/HAS_TIME_ACCOUNT_NUMBER =/ s#= .*#= 1234123412341234#" \
UITests.xcconfig
@@ -65,16 +42,6 @@ jobs:
brew update
brew install zip
- - name: Install xcbeautify
- run: |
- brew update
- brew install xcbeautify
-
- - name: Install protobuf
- run: |
- brew update
- brew install protobuf
-
- name: Run screenshot tests
run: |
set -o pipefail && env NSUnbufferedIO=YES xcodebuild \
diff --git a/.github/workflows/ios-validate-build-schemas.yml b/.github/workflows/ios-validate-build-schemas.yml
index c73a66d13b..4fe5cc9d5d 100644
--- a/.github/workflows/ios-validate-build-schemas.yml
+++ b/.github/workflows/ios-validate-build-schemas.yml
@@ -24,54 +24,12 @@ jobs:
runs-on: macos-15-xlarge
env:
SOURCE_PACKAGES_PATH: .spm
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
-
- - name: Checkout submodules
- run: |
- git config --global --add safe.directory '*'
- git submodule update --init --recursive ios/wireguard-apple
-
- - name: Configure cache
- uses: actions/cache@v3
- with:
- path: ios/${{ env.SOURCE_PACKAGES_PATH }}
- key: ${{ runner.os }}-spm-${{ hashFiles('ios/**/Package.resolved') }}
- restore-keys: |
- ${{ runner.os }}-spm-
-
- - name: Setup go-lang
- uses: actions/setup-go@v3
- with:
- go-version: 1.21.13
- - name: Configure Xcode
- uses: maxim-lobanov/setup-xcode@v1
+ steps:
+ - name: Setup project
+ uses: ./.github/actions/ios/setup-project-toolchain
with:
- xcode-version: '16.1'
- - name: Configure Rust
- run: rustup target add aarch64-apple-ios-sim x86_64-apple-ios
-
- - name: Configure Xcode project
- run: |
- cp Base.xcconfig.template Base.xcconfig
- cp App.xcconfig.template App.xcconfig
- cp PacketTunnel.xcconfig.template PacketTunnel.xcconfig
- cp Screenshots.xcconfig.template Screenshots.xcconfig
- cp Api.xcconfig.template Api.xcconfig
- cp UITests.xcconfig.template UITests.xcconfig
- working-directory: ios/Configurations
-
- - name: Install xcbeautify
- run: |
- brew update
- brew install xcbeautify
-
- - name: Install protobuf
- run: |
- brew update
- brew install protobuf
+ ios_rust_target: aarch64-apple-ios-sim
- name: Run build validation for Staging and MockRelease configurations as well as the MullvadVPNUITests target
run: |
diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml
index 9c0bbc6f01..ecdad1e4e2 100644
--- a/.github/workflows/ios.yml
+++ b/.github/workflows/ios.yml
@@ -52,62 +52,10 @@ jobs:
env:
SOURCE_PACKAGES_PATH: .spm
steps:
- - name: Checkout repository
- uses: actions/checkout@v4
-
- - name: Checkout submodules
- run: |
- git config --global --add safe.directory '*'
- git submodule update --init --recursive ios/wireguard-apple
-
-
- - name: Configure cache
- uses: actions/cache@v3
- with:
- path: ios/${{ env.SOURCE_PACKAGES_PATH }}
- key: ${{ runner.os }}-spm-${{ hashFiles('ios/**/Package.resolved') }}
- restore-keys: |
- ${{ runner.os }}-spm-
-
- - name: Setup go-lang
- uses: actions/setup-go@v3
+ - name: Setup project
+ uses: ./.github/actions/ios/setup-project-toolchain
with:
- go-version: 1.21.13
-
- - name: Install xcbeautify
- run: |
- brew update
- brew install xcbeautify
-
- - name: Install protobuf
- run: |
- brew update
- brew install protobuf
-
- - name: Configure Xcode
- uses: maxim-lobanov/setup-xcode@v1
- with:
- xcode-version: '16.1'
- - name: Configure Rust
- # Since the https://github.com/actions/runner-images/releases/tag/macos-13-arm64%2F20240721.1 release
- # Brew does not install tools at the correct location anymore
- # This update broke the rust build script which was assuming the cargo binary was located in ~/.cargo/bin/cargo
- # The workaround is to fix brew paths by running brew bundle dump, and then brew bundle
- # WARNING: This has to be the last brew "upgrade" commands that is ran,
- # otherwise the brew path will be broken again.
- run: |
- brew bundle dump
- brew bundle
- rustup target add aarch64-apple-ios-sim
-
- - name: Configure Xcode project
- run: |
- cp Base.xcconfig.template Base.xcconfig
- cp App.xcconfig.template App.xcconfig
- cp PacketTunnel.xcconfig.template PacketTunnel.xcconfig
- cp Screenshots.xcconfig.template Screenshots.xcconfig
- cp Api.xcconfig.template Api.xcconfig
- working-directory: ios/Configurations
+ ios_rust_target: aarch64-apple-ios-sim
- name: Run unit tests
run: |