mirror of
https://github.com/signalapp/Signal-iOS.git
synced 2025-12-05 01:10:41 +00:00
Check Xcode Cloud/GitHub Action Xcode versions
This commit is contained in:
6
.github/workflows/main.yml
vendored
6
.github/workflows/main.yml
vendored
@@ -37,7 +37,13 @@ jobs:
|
||||
- name: Set Xcode version
|
||||
run: |
|
||||
echo DEVELOPER_DIR=/Applications/${{matrix.xcode}}.app >> "$GITHUB_ENV"
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Check Xcode version
|
||||
run: |
|
||||
Scripts/check_xcode_version.py
|
||||
|
||||
- uses: ./.github/actions/clone-everything
|
||||
with:
|
||||
access-token: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
1
.xcode-version
Normal file
1
.xcode-version
Normal file
@@ -0,0 +1 @@
|
||||
Xcode 16.1
|
||||
28
Scripts/check_xcode_version.py
Executable file
28
Scripts/check_xcode_version.py
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import subprocess
|
||||
|
||||
|
||||
def get_actual_version():
|
||||
return subprocess.run(
|
||||
["xcodebuild", "-version"], check=True, capture_output=True, encoding="utf8"
|
||||
).stdout.split("\n")[0]
|
||||
|
||||
|
||||
def get_expected_version():
|
||||
with open(".xcode-version", "r") as file:
|
||||
return file.read().rstrip()
|
||||
|
||||
|
||||
def main():
|
||||
actual_version = get_actual_version()
|
||||
expected_version = get_expected_version()
|
||||
if actual_version != expected_version:
|
||||
print(
|
||||
f"You’re using {actual_version} but you should be using {expected_version}."
|
||||
)
|
||||
exit(1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -5,4 +5,5 @@ set -eux
|
||||
./send_build_notification.py started || :
|
||||
|
||||
cd ..
|
||||
Scripts/check_xcode_version.py
|
||||
make dependencies
|
||||
|
||||
Reference in New Issue
Block a user