Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Use macOS 15 to build #206

Merged
merged 13 commits into from
Nov 26, 2024
3 changes: 2 additions & 1 deletion .github/scripts/github_before_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ shopt -s nocasematch

if [[ $_target_cpu == "arm64" ]]; then
echo 'target_cpu = "arm64"' >> "$_root_dir/flags.macos.gn"
# sudo xcode-select -s "/Applications/Xcode_13.4.app"
else
echo 'target_cpu = "x64"' >> "$_root_dir/flags.macos.gn"
fi

cp "$_main_repo/flags.gn" "$_src_dir/out/Default/args.gn"
Expand Down
6 changes: 4 additions & 2 deletions .github/scripts/github_fetch_resources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# Simple script for downloading and unpacking required resources to build Ungoogled-Chromium macOS binaries on GitHub Actions

_target_cpu="${1:-x64}"

_root_dir=$(dirname $(greadlink -f $0))
_download_cache="$_root_dir/build/download_cache"
_src_dir="$_root_dir/build/src"
Expand All @@ -14,7 +16,7 @@ sudo du -hs "$_src_dir"
rm -rf "$_src_dir/out" || true
mkdir -p "$_download_cache"

"$_root_dir/retrieve_and_unpack_resource.sh" -g
"$_root_dir/retrieve_and_unpack_resource.sh" -g "$_target_cpu"

mkdir -p "$_src_dir/out/Default"

Expand All @@ -25,6 +27,6 @@ mkdir -p "$_src_dir/out/Default"
mkdir -p "$_src_dir/third_party/llvm-build/Release+Asserts"
mkdir -p "$_src_dir/third_party/rust-toolchain/bin"

"$_root_dir/retrieve_and_unpack_resource.sh" -p
"$_root_dir/retrieve_and_unpack_resource.sh" -p "$_target_cpu"

rm -rvf "$_download_cache"
6 changes: 3 additions & 3 deletions .github/scripts/github_generate_release_note.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ _chromium_version=$(cat $_root_dir/ungoogled-chromium/chromium_version.txt)
_ungoogled_revision=$(cat $_root_dir/ungoogled-chromium/revision.txt)
_package_revision=$(cat $_root_dir/revision.txt)

_x64_hash_name="ungoogled-chromium_${_chromium_version}-${_ungoogled_revision}.${_package_revision}_x86-64-macos.dmg.hashes.md"
# _x64_hash_name="ungoogled-chromium_${_chromium_version}-${_ungoogled_revision}.${_package_revision}_x86-64-macos.dmg.hashes.md"
_arm64_hash_name="ungoogled-chromium_${_chromium_version}-${_ungoogled_revision}.${_package_revision}_arm64-macos.dmg.hashes.md"
_release_tag_version="${_chromium_version}-${_ungoogled_revision}.${_package_revision}"

Expand All @@ -26,7 +26,7 @@ if [ -f $_root_dir/announcements.md ]; then
fi

cat $_arm64_hash_name | tee -a ./github_release_note.md
printf '\n' | tee -a ./github_release_note.md
cat $_x64_hash_name | tee -a ./github_release_note.md
# printf '\n' | tee -a ./github_release_note.md
# cat $_x64_hash_name | tee -a ./github_release_note.md
printf '\n\n---\n\n' | tee -a ./github_release_note.md
printf 'See [this GitHub Actions Run](%s) for the [Workflow file](%s/workflow) used as well as the build logs and artifacts\n' "$_gh_run_href" "$_gh_run_href" | tee -a ./github_release_note.md
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
arch: [arm64, x86-64]
include:
- arch: arm64
os: macos-14
- arch: x86-64
os: macos-13
os: macos-15
# - arch: x86-64
# os: macos-15
fail-fast: true
max-parallel: 2
uses: ./.github/workflows/building.yml
Expand Down Expand Up @@ -51,10 +51,10 @@ jobs:
- name: Prepare release
id: bake
run: ./github_prepare_release.sh | tee -a github_actions_release.log
- name: Get built x86-64 binary
uses: actions/download-artifact@v4
with:
name: ${{ steps.bake.outputs.x64_file_name }}
# - name: Get built x86-64 binary
# uses: actions/download-artifact@v4
# with:
# name: ${{ steps.bake.outputs.x64_file_name }}
- name: Get built arm64 binary
uses: actions/download-artifact@v4
with:
Expand All @@ -70,8 +70,8 @@ jobs:
draft: false
prerelease: false
files: |
./release_asset/${{ steps.bake.outputs.x64_file_name }}
./release_asset/${{ steps.bake.outputs.arm64_file_name }}
# ./release_asset/${{ steps.bake.outputs.x64_file_name }}
name: ${{ steps.bake.outputs.release_name }}
tag_name: ${{ steps.bake.outputs.release_tag_version }}
token: ${{ secrets.GITHUB_TOKEN }}
60 changes: 30 additions & 30 deletions .github/workflows/building.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
runs-on: ${{ inputs.os }}
steps:
- name: Cleanup Xcode installations
run: sudo mv /Applications/Xcode_15.0.1.app /Applications/tmp_xcode_15.0.1.app ; sudo rm -rf /Applications/Xcode* ; sudo mv /Applications/tmp_xcode_15.0.1.app /Applications/Xcode_15.0.1.app
run: sudo mv /Applications/Xcode_16.app /Applications/tmp_Xcode_16.app ; sudo rm -rf /Applications/Xcode* ; sudo mv /Applications/tmp_Xcode_16.app /Applications/Xcode_16.app
- name: Select Xcode version
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Cleanup Xcode Simulators
run: sudo xcrun simctl delete all
- name: Cleanup Android Related Stuff
Expand All @@ -49,7 +49,7 @@ jobs:
- name: Install httplib2 for Python
run: pip install httplib2 --break-system-package
- name: Download and unpack required resources
run: ./github_fetch_resources.sh | tee -a github_actions_retrieve_resources.log
run: ./github_fetch_resources.sh ${{ inputs.arch }} | tee -a github_actions_retrieve_resources.log
- name: List resources
run: ls -la
- name: Archive resources
Expand All @@ -68,9 +68,9 @@ jobs:
status: ${{ steps.build.outputs.status }}
steps:
- name: Cleanup Xcode installations
run: sudo mv /Applications/Xcode_15.0.1.app /Applications/tmp_xcode_15.0.1.app ; sudo rm -rf /Applications/Xcode* ; sudo mv /Applications/tmp_xcode_15.0.1.app /Applications/Xcode_15.0.1.app
run: sudo mv /Applications/Xcode_16.app /Applications/tmp_Xcode_16.app ; sudo rm -rf /Applications/Xcode* ; sudo mv /Applications/tmp_Xcode_16.app /Applications/Xcode_16.app
- name: Select Xcode version
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Cleanup Xcode Simulators
run: sudo xcrun simctl delete all
- name: Cleanup Android Related Stuff
Expand All @@ -84,7 +84,7 @@ jobs:
- name: Disable Spotlight
run: sudo mdutil -a -i off
- name: Run xcode-select
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -137,9 +137,9 @@ jobs:
status: ${{ steps.build.outputs.status }}
steps:
- name: Cleanup Xcode installations
run: sudo mv /Applications/Xcode_15.0.1.app /Applications/tmp_xcode_15.0.1.app ; sudo rm -rf /Applications/Xcode* ; sudo mv /Applications/tmp_xcode_15.0.1.app /Applications/Xcode_15.0.1.app
run: sudo mv /Applications/Xcode_16.app /Applications/tmp_Xcode_16.app ; sudo rm -rf /Applications/Xcode* ; sudo mv /Applications/tmp_Xcode_16.app /Applications/Xcode_16.app
- name: Select Xcode version
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Cleanup Xcode Simulators
run: sudo xcrun simctl delete all
- name: Cleanup Android Related Stuff
Expand All @@ -153,7 +153,7 @@ jobs:
- name: Disable spotlight
run: sudo mdutil -a -i off
- name: Run xcode-select
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Get previous logs
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -206,9 +206,9 @@ jobs:
status: ${{ steps.build.outputs.status }}
steps:
- name: Cleanup Xcode installations
run: sudo mv /Applications/Xcode_15.0.1.app /Applications/tmp_xcode_15.0.1.app ; sudo rm -rf /Applications/Xcode* ; sudo mv /Applications/tmp_xcode_15.0.1.app /Applications/Xcode_15.0.1.app
run: sudo mv /Applications/Xcode_16.app /Applications/tmp_Xcode_16.app ; sudo rm -rf /Applications/Xcode* ; sudo mv /Applications/tmp_Xcode_16.app /Applications/Xcode_16.app
- name: Select Xcode version
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Cleanup Xcode Simulators
run: sudo xcrun simctl delete all
- name: Cleanup Android Related Stuff
Expand All @@ -222,7 +222,7 @@ jobs:
- name: Disable spotlight
run: sudo mdutil -a -i off
- name: Run xcode-select
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Get previous logs
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -275,9 +275,9 @@ jobs:
status: ${{ steps.build.outputs.status }}
steps:
- name: Cleanup Xcode installations
run: sudo mv /Applications/Xcode_15.0.1.app /Applications/tmp_xcode_15.0.1.app ; sudo rm -rf /Applications/Xcode* ; sudo mv /Applications/tmp_xcode_15.0.1.app /Applications/Xcode_15.0.1.app
run: sudo mv /Applications/Xcode_16.app /Applications/tmp_Xcode_16.app ; sudo rm -rf /Applications/Xcode* ; sudo mv /Applications/tmp_Xcode_16.app /Applications/Xcode_16.app
- name: Select Xcode version
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Cleanup Xcode Simulators
run: sudo xcrun simctl delete all
- name: Cleanup Android Related Stuff
Expand All @@ -291,7 +291,7 @@ jobs:
- name: Disable spotlight
run: sudo mdutil -a -i off
- name: Run xcode-select
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Get previous logs
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -344,9 +344,9 @@ jobs:
status: ${{ steps.build.outputs.status }}
steps:
- name: Cleanup Xcode installations
run: sudo mv /Applications/Xcode_15.0.1.app /Applications/tmp_xcode_15.0.1.app ; sudo rm -rf /Applications/Xcode* ; sudo mv /Applications/tmp_xcode_15.0.1.app /Applications/Xcode_15.0.1.app
run: sudo mv /Applications/Xcode_16.app /Applications/tmp_Xcode_16.app ; sudo rm -rf /Applications/Xcode* ; sudo mv /Applications/tmp_Xcode_16.app /Applications/Xcode_16.app
- name: Select Xcode version
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Cleanup Xcode Simulators
run: sudo xcrun simctl delete all
- name: Cleanup Android Related Stuff
Expand All @@ -360,7 +360,7 @@ jobs:
- name: Disable spotlight
run: sudo mdutil -a -i off
- name: Run xcode-select
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Get previous logs
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -413,9 +413,9 @@ jobs:
status: ${{ steps.build.outputs.status }}
steps:
- name: Cleanup Xcode installations
run: sudo mv /Applications/Xcode_15.0.1.app /Applications/tmp_xcode_15.0.1.app ; sudo rm -rf /Applications/Xcode* ; sudo mv /Applications/tmp_xcode_15.0.1.app /Applications/Xcode_15.0.1.app
run: sudo mv /Applications/Xcode_16.app /Applications/tmp_Xcode_16.app ; sudo rm -rf /Applications/Xcode* ; sudo mv /Applications/tmp_Xcode_16.app /Applications/Xcode_16.app
- name: Select Xcode version
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Cleanup Xcode Simulators
run: sudo xcrun simctl delete all
- name: Cleanup Android Related Stuff
Expand All @@ -429,7 +429,7 @@ jobs:
- name: Disable spotlight
run: sudo mdutil -a -i off
- name: Run xcode-select
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Get previous logs
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -482,9 +482,9 @@ jobs:
status: ${{ steps.build.outputs.status }}
steps:
- name: Cleanup Xcode installations
run: sudo mv /Applications/Xcode_15.0.1.app /Applications/tmp_xcode_15.0.1.app ; sudo rm -rf /Applications/Xcode* ; sudo mv /Applications/tmp_xcode_15.0.1.app /Applications/Xcode_15.0.1.app
run: sudo mv /Applications/Xcode_16.app /Applications/tmp_Xcode_16.app ; sudo rm -rf /Applications/Xcode* ; sudo mv /Applications/tmp_Xcode_16.app /Applications/Xcode_16.app
- name: Select Xcode version
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Cleanup Xcode Simulators
run: sudo xcrun simctl delete all
- name: Cleanup Android Related Stuff
Expand All @@ -498,7 +498,7 @@ jobs:
- name: Disable spotlight
run: sudo mdutil -a -i off
- name: Run xcode-select
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Get previous logs
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -551,9 +551,9 @@ jobs:
status: ${{ steps.build.outputs.status }}
steps:
- name: Cleanup Xcode installations
run: sudo mv /Applications/Xcode_15.0.1.app /Applications/tmp_xcode_15.0.1.app ; sudo rm -rf /Applications/Xcode* ; sudo mv /Applications/tmp_xcode_15.0.1.app /Applications/Xcode_15.0.1.app
run: sudo mv /Applications/Xcode_16.app /Applications/tmp_Xcode_16.app ; sudo rm -rf /Applications/Xcode* ; sudo mv /Applications/tmp_Xcode_16.app /Applications/Xcode_16.app
- name: Select Xcode version
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Cleanup Xcode Simulators
run: sudo xcrun simctl delete all
- name: Cleanup Android Related Stuff
Expand All @@ -567,7 +567,7 @@ jobs:
- name: Disable spotlight
run: sudo mdutil -a -i off
- name: Run xcode-select
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Get previous logs
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -620,9 +620,9 @@ jobs:
status: ${{ steps.build.outputs.status }}
steps:
- name: Cleanup Xcode installations
run: sudo mv /Applications/Xcode_15.0.1.app /Applications/tmp_xcode_15.0.1.app ; sudo rm -rf /Applications/Xcode* ; sudo mv /Applications/tmp_xcode_15.0.1.app /Applications/Xcode_15.0.1.app
run: sudo mv /Applications/Xcode_16.app /Applications/tmp_Xcode_16.app ; sudo rm -rf /Applications/Xcode* ; sudo mv /Applications/tmp_Xcode_16.app /Applications/Xcode_16.app
- name: Select Xcode version
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Cleanup Xcode Simulators
run: sudo xcrun simctl delete all
- name: Cleanup Android Related Stuff
Expand All @@ -636,7 +636,7 @@ jobs:
- name: Disable spotlight
run: sudo mdutil -a -i off
- name: Run xcode-select
run: sudo xcode-select --switch /Applications/Xcode_15.0.1.app
run: sudo xcode-select --switch /Applications/Xcode_16.app
- name: Get previous logs
uses: actions/download-artifact@v4
with:
Expand Down
Loading