Skip to content

Commit

Permalink
Merge pull request #635 from uazo/use-cromite-name
Browse files Browse the repository at this point in the history
Rename bromite -> cromite scripts
  • Loading branch information
uazo authored Dec 27, 2023
2 parents 642700f + 66746d2 commit 828c891
Show file tree
Hide file tree
Showing 30 changed files with 572 additions and 472 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ jobs:
if [[ "$LATEST_WIN" == "$CHR_VERSION" ]]; then
echo Using Windows Release >>body.txt
echo "\`\`\`" >>body.txt
curl -s 'https://chromiumdash.appspot.com/fetch_releases?channel=Stable&platform=Windows&num=10&offset=0' | \
jq --arg LATEST "$LATEST_WIN" '.[] | select( .version == $LATEST )' >>body.txt
echo "\`\`\`" >>body.txt
fi
if [[ "$LATEST_ANDROID" == "$CHR_VERSION" ]]; then
Expand Down
59 changes: 29 additions & 30 deletions .github/workflows/build_cromite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ on:
default: 'false'

env:
BROMITE_SHA: ${{ github.event.inputs.sha }}
CROMITE_SHA: ${{ github.event.inputs.sha }}
REMOVEDOCKERSUPPORT: true
USELOCALIMAGE: true

Expand Down Expand Up @@ -69,7 +69,6 @@ jobs:
shell: bash
run: |
export VERSION=$( cat ./cromite/build/RELEASE )
rm -rf bromite
echo Current version is $VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
Expand Down Expand Up @@ -107,43 +106,43 @@ jobs:
fi
fi
- name: Building cromite container ${{ env.VERSION }}-${{ env.BROMITE_SHA }}
- name: Building cromite container ${{ env.VERSION }}-${{ env.CROMITE_SHA }}
shell: bash
run: |
IS_PRESENT=$(docker inspect --type=image uazo/cromite:$VERSION-$BROMITE_SHA > /dev/null ; echo $?)
IS_PRESENT=$(docker inspect --type=image uazo/cromite:$VERSION-$CROMITE_SHA > /dev/null ; echo $?)
if [ $IS_PRESENT -ne "0" ]; then
IS_PRESENT=$(docker manifest inspect uazo/cromite:$VERSION-$BROMITE_SHA > /dev/null ; echo $?)
IS_PRESENT=$(docker manifest inspect uazo/cromite:$VERSION-$CROMITE_SHA > /dev/null ; echo $?)
if [ $IS_PRESENT -ne "0" ]; then
DOCKER_BUILDKIT=1 docker build -t uazo/cromite:$VERSION-$BROMITE_SHA --progress plain \
--build-arg BROMITE_SHA=$BROMITE_SHA \
DOCKER_BUILDKIT=1 docker build -t uazo/cromite:$VERSION-$CROMITE_SHA --progress plain \
--build-arg CROMITE_SHA=$CROMITE_SHA \
--build-arg VERSION=$VERSION \
--build-arg HTTP_PROXY="$PROXY_ADDR" \
cromite/tools/images/bromite-source/.
cromite/tools/images/cromite-source/.
fi
fi
- name: Building cromite-build container ${{ env.VERSION }}-${{ env.BROMITE_SHA }}
- name: Building cromite-build container ${{ env.VERSION }}-${{ env.CROMITE_SHA }}
shell: bash
run: |
IS_PRESENT=$(docker inspect --type=image uazo/cromite-build:$VERSION-$BROMITE_SHA > /dev/null ; echo $?)
IS_PRESENT=$(docker inspect --type=image uazo/cromite-build:$VERSION-$CROMITE_SHA > /dev/null ; echo $?)
if [ $IS_PRESENT -ne "0" ]; then
IS_PRESENT=$(docker manifest inspect uazo/cromite-build:$VERSION-$BROMITE_SHA > /dev/null ; echo $?)
IS_PRESENT=$(docker manifest inspect uazo/cromite-build:$VERSION-$CROMITE_SHA > /dev/null ; echo $?)
if [ $IS_PRESENT -ne "0" ]; then
DOCKER_BUILDKIT=1 docker build -t uazo/cromite-build:$VERSION-$BROMITE_SHA --progress plain \
--build-arg BROMITE_SHA=$BROMITE_SHA \
DOCKER_BUILDKIT=1 docker build -t uazo/cromite-build:$VERSION-$CROMITE_SHA --progress plain \
--build-arg CROMITE_SHA=$CROMITE_SHA \
--build-arg VERSION=$VERSION \
--build-arg HTTP_PROXY="$PROXY_ADDR" \
--no-cache \
cromite/tools/images/bromite-build/.
cromite/tools/images/cromite-build/.
fi
fi
- name: Get uazo/cromite-build from docker hub if present
shell: bash
run: |
IS_PRESENT=$(docker manifest inspect uazo/cromite-build:$VERSION-$BROMITE_SHA > /dev/null ; echo $?)
IS_PRESENT=$(docker manifest inspect uazo/cromite-build:$VERSION-$CROMITE_SHA > /dev/null ; echo $?)
if [ $IS_PRESENT -eq "0" ]; then
docker pull uazo/cromite-build:$VERSION-$BROMITE_SHA
docker pull uazo/cromite-build:$VERSION-$CROMITE_SHA
fi
- name: Mark image to build
Expand All @@ -153,7 +152,7 @@ jobs:
if [ $IS_PRESENT -eq "0" ]; then
docker rmi uazo/cromite-build:build
fi
docker tag uazo/cromite-build:$VERSION-$BROMITE_SHA uazo/cromite-build:build
docker tag uazo/cromite-build:$VERSION-$CROMITE_SHA uazo/cromite-build:build
build:
runs-on: ${{ github.event.inputs.type }}
Expand Down Expand Up @@ -249,7 +248,7 @@ jobs:
cd $WORKSPACE/chromium/src
echo "::group::-------- gn gen"
gn gen --args="import(\"/home/lg/working_dir/bromite/build/bromite.gn_args\") $(cat ../../build_args.gni) target_cpu = \"x64\" " out/x64
gn gen --args="target_os = \"android\" $(cat /home/lg/working_dir/cromite/build/cromite.gn_args) target_cpu = \"x64\" " out/x64
echo "::endgroup::"
echo "::group::-------- gn args"
Expand All @@ -260,7 +259,7 @@ jobs:
ninja -C out/x64 chrome_public_bundle
ninja -C out/x64 chrome_public_apk
cp ../../bromite/build/RELEASE out/x64
cp ../../cromite/build/RELEASE out/x64
- name: Get ninja logs Android x64
if: ${{ (github.event.inputs.target_os == 'android' || github.event.inputs.target_os == 'all') && (github.event.inputs.build == 'x64' || github.event.inputs.build == 'all') }}
Expand All @@ -278,7 +277,7 @@ jobs:
cd $WORKSPACE/chromium/src
echo "::group::-------- gn gen"
gn gen --args="import(\"/home/lg/working_dir/bromite/build/bromite.gn_args\") target_os = \"win\" $(cat ../../build_args.gni) target_cpu = \"x64\" " out/win64
gn gen --args="target_os = \"win\" $(cat /home/lg/working_dir/cromite/build/cromite.gn_args) target_cpu = \"x64\" " out/win64
echo "::endgroup::"
echo "::group::-------- gn args"
Expand All @@ -288,7 +287,7 @@ jobs:
ninja -C out/win64 chrome
cp ../../bromite/build/RELEASE out/win64
cp ../../cromite/build/RELEASE out/win64
- name: Get ninja logs Windows x64
if: ${{ github.event.inputs.target_os == 'win' || github.event.inputs.target_os == 'all' }}
Expand All @@ -306,7 +305,7 @@ jobs:
cd $WORKSPACE/chromium/src
echo "::group::-------- gn gen"
gn gen --args="import(\"/home/lg/working_dir/bromite/build/bromite.gn_args\") $(cat ../../build_args.gni) target_cpu = \"arm64\" " out/arm64
gn gen --args="target_os = \"android\" $(cat /home/lg/working_dir/cromite/build/cromite.gn_args) target_cpu = \"arm64\" " out/arm64
echo "::endgroup::"
echo "::group::-------- gn args"
Expand All @@ -317,7 +316,7 @@ jobs:
ninja -C out/arm64 chrome_public_bundle
ninja -C out/arm64 chrome_public_apk
cp ../../bromite/build/RELEASE out/arm64
cp ../../cromite/build/RELEASE out/arm64
- name: Get ninja logs Android arm64
if: ${{ (github.event.inputs.target_os == 'android' || github.event.inputs.target_os == 'all') && (github.event.inputs.build == 'arm64' || github.event.inputs.build == 'all') }}
Expand Down Expand Up @@ -361,7 +360,7 @@ jobs:
cd $WORKSPACE/chromium/src
echo "::group::-------- gn gen"
gn gen --args="import(\"/home/lg/working_dir/bromite/build/bromite.gn_args\") $(cat ../../build_args.gni) target_cpu = \"arm\" " out/arm
gn gen --args="target_os = \"android\" $(cat /home/lg/working_dir/cromite/build/cromite.gn_args) target_cpu = \"arm\" " out/arm
echo "::endgroup::"
echo "::group::-------- gn args"
Expand All @@ -372,7 +371,7 @@ jobs:
ninja -C out/arm chrome_public_bundle
ninja -C out/arm chrome_public_apk
cp ../../bromite/build/RELEASE out/arm
cp ../../cromite/build/RELEASE out/arm
- name: Get ninja logs Android arm
if: ${{ (github.event.inputs.target_os == 'android' || github.event.inputs.target_os == 'all') && (github.event.inputs.build == 'arm' || github.event.inputs.build == 'all') }}
Expand All @@ -390,7 +389,7 @@ jobs:
cd $WORKSPACE/chromium/src
echo "::group::-------- gn gen"
gn gen --args="import(\"/home/lg/working_dir/bromite/build/bromite.gn_args\") target_os = \"linux\" $(cat ../../build_args.gni) target_cpu = \"x64\" use_sysroot = true " out/lin64
gn gen --args="target_os = \"linux\" $(cat /home/lg/working_dir/cromite/build/cromite.gn_args) target_cpu = \"x64\" " out/lin64
echo "::endgroup::"
echo "::group::-------- gn args"
Expand All @@ -400,7 +399,7 @@ jobs:
ninja -C out/lin64 chrome
cp ../../bromite/build/RELEASE out/lin64
cp ../../cromite/build/RELEASE out/lin64
- name: Get ninja logs Linux 64
if: ${{ (github.event.inputs.target_os == 'linux' || github.event.inputs.target_os == 'all') }}
Expand All @@ -417,10 +416,10 @@ jobs:
PATH=$WORKSPACE/chromium/src/third_party/llvm-build/Release+Asserts/bin:$WORKSPACE/depot_tools/:/usr/local/go/bin:$WORKSPACE/mtool/bin:$PATH
cd $WORKSPACE/chromium/src
test -f out/arm64/bromite.idx || \
test -f out/arm64/cromite.idx || \
cp -r out/arm64 out/clangd && \
gn gen --args="import(\"/home/lg/working_dir/bromite/build/bromite.gn_args\") $(cat ../../build_args.gni) skip_clangd_unsupported_options = true" out/clangd && \
gn gen --args="import(\"/home/lg/working_dir/cromite/build/cromite.gn_args\") $(cat ../../build_args.gni) skip_clangd_unsupported_options = true" out/clangd && \
$WORKSPACE/ninja/ninja -C $WORKSPACE/chromium/src/out/clangd -a chrome_public_apk \
-t compdb cc cxx objc objcxx >$WORKSPACE/chromium/src/out/clangd/compile_commands.json && \
/home/lg/working_dir/clangd_snapshot_20211205/bin/clangd-indexer --executor=all-TUs out/clangd/compile_commands.json >out/arm64/bromite.idx && \
/home/lg/working_dir/clangd_snapshot_20211205/bin/clangd-indexer --executor=all-TUs out/clangd/compile_commands.json >out/arm64/cromite.idx && \
rm -rf out/clangd
2 changes: 1 addition & 1 deletion .github/workflows/check-git-apply.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
bash ~/cromite/tools/apply-all-patch.sh || exit 1
rm -rf ~/cromite/build/patches-new/
rm ~/cromite/build/bromite_patches_list_new.txt
rm ~/cromite/build/cromite_patches_list_new.txt
- name: Export patches
run: |
Expand Down
66 changes: 47 additions & 19 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
default: 'ci'

env:
BROMITE_SHA: ${{ github.event.inputs.sha }}
CROMITE_SHA: ${{ github.event.inputs.sha }}
REMOVEDOCKERSUPPORT: true
USELOCALIMAGE: true

Expand All @@ -27,6 +27,7 @@ jobs:
OUTPUTFILE_ARM64: /storage/images/${{ github.event.inputs.sha }}/android/false/arm64/
OUTPUTFILE_X64: /storage/images/${{ github.event.inputs.sha }}/android/false/x64/
OUTPUTFILE_WIN: /storage/images/${{ github.event.inputs.sha }}/win/x64/
OUTPUTFILE_LIN: /storage/images/${{ github.event.inputs.sha }}/win/lin64/

steps:
- name: Login to Docker Hub
Expand All @@ -39,7 +40,7 @@ jobs:
run: |
wget https://github.com/ericchiang/pup/releases/download/v0.4.0/pup_v0.4.0_linux_amd64.zip
unzip pup_v0.4.0_linux_amd64.zip && rm pup_v0.4.0_linux_amd64.zip
BRANCH=$(curl https://github.com/uazo/cromite/branch_commits/$BROMITE_SHA | ./pup -p li.branch:last-child a text{} | xargs)
BRANCH=$(curl https://github.com/uazo/cromite/branch_commits/$CROMITE_SHA | ./pup -p li.branch:last-child a text{} | xargs)
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
wget https://github.com/cli/cli/releases/download/v2.18.1/gh_2.18.1_linux_amd64.tar.gz
Expand Down Expand Up @@ -70,48 +71,48 @@ jobs:
# echo "you can try it at your own risk." >>note
echo "\`\`\`" >>note
$GH release create $VERSION-$BROMITE_SHA --notes-file note -d
$GH release create $VERSION-$CROMITE_SHA --notes-file note -d
# android arm
echo "::group::-------- android arm"
sudo cp ${{ env.OUTPUTFILE_ARM }}/apks/ChromePublic.apk arm_ChromePublic.apk
sudo chown runner arm_ChromePublic.apk
echo Uploading arm_ChromePublic
$GH release upload $VERSION-$BROMITE_SHA arm_ChromePublic.apk
$GH release upload $VERSION-$CROMITE_SHA arm_ChromePublic.apk
echo "::endgroup::"
# android arm64
echo "::group::-------- android arm64"
sudo cp ${{ env.OUTPUTFILE_ARM64 }}/apks/ChromePublic.apk arm64_ChromePublic.apk
sudo chown runner arm64_ChromePublic.apk
echo Uploading arm64_ChromePublic
$GH release upload $VERSION-$BROMITE_SHA arm64_ChromePublic.apk
$GH release upload $VERSION-$CROMITE_SHA arm64_ChromePublic.apk
echo "::endgroup::"
# android x64
echo "::group::-------- android x64"
sudo cp ${{ env.OUTPUTFILE_X64 }}/apks/ChromePublic.apk x64_ChromePublic.apk
sudo chown runner x64_ChromePublic.apk
echo Uploading x64_ChromePublic
$GH release upload $VERSION-$BROMITE_SHA x64_ChromePublic.apk
$GH release upload $VERSION-$CROMITE_SHA x64_ChromePublic.apk
echo "::endgroup::"
echo "::group::-------- chrome.size"
test $VERSION-$BROMITE_SHA $OUTPUTFILE_ARM64/chrome.size && \
$GH release upload $VERSION-$BROMITE_SHA $OUTPUTFILE_ARM64/chrome.size
test $VERSION-$CROMITE_SHA $OUTPUTFILE_ARM64/chrome.size && \
$GH release upload $VERSION-$CROMITE_SHA $OUTPUTFILE_ARM64/chrome.size
echo "::endgroup::"
echo "::group::-------- ChromePublic.apk.mapping"
sudo cp ${{ env.OUTPUTFILE_ARM64 }}/apks/ChromePublic.apk.mapping arm64_ChromePublic.apk.mapping
$GH release upload $VERSION-$BROMITE_SHA arm64_ChromePublic.apk.mapping
$GH release upload $VERSION-$CROMITE_SHA arm64_ChromePublic.apk.mapping
sudo cp ${{ env.OUTPUTFILE_X64 }}/apks/ChromePublic.apk.mapping x64_ChromePublic.apk.mapping
$GH release upload $VERSION-$BROMITE_SHA x64_ChromePublic.apk.mapping
$GH release upload $VERSION-$CROMITE_SHA x64_ChromePublic.apk.mapping
echo "::endgroup::"
echo "::group::-------- Uploading arm64_ninja_log_trace.html"
test $OUTPUTFILE_ARM64/ninja_log_trace.html && \
cp $OUTPUTFILE_ARM64/ninja_log_trace.html arm64_ninja_log_trace.html && \
$GH release upload $VERSION-$BROMITE_SHA arm64_ninja_log_trace.html
$GH release upload $VERSION-$CROMITE_SHA arm64_ninja_log_trace.html
echo "::endgroup::"
# windows x64
Expand Down Expand Up @@ -149,27 +150,54 @@ jobs:
zip -r chrome-win.zip chrome-win/
echo Uploading chrome-win.zip
$GH release upload $VERSION-$BROMITE_SHA chrome-win.zip
$GH release upload $VERSION-$CROMITE_SHA chrome-win.zip
echo "::endgroup::"
## linux
echo "::group::-------- linux x64"
mkdir chrome-lin/
cp $OUTPUTFILE_LIN/chrome chrome-lin/
cp $OUTPUTFILE_LIN/chrome_100_percent.pak chrome-lin/
cp $OUTPUTFILE_LIN/chrome_200_percent.pak chrome-lin/
cp $OUTPUTFILE_LIN/chrome_crashpad_handler chrome-lin/
cp $OUTPUTFILE_LIN/chrome-wrapper chrome-lin/
cp $OUTPUTFILE_LIN/icudtl.dat chrome-lin/
cp $OUTPUTFILE_LIN/libEGL.so chrome-lin/
cp $OUTPUTFILE_LIN/libGLESv2.so chrome-lin/
cp $OUTPUTFILE_LIN/libqt5_shim.so chrome-lin/
cp $OUTPUTFILE_LIN/libqt6_shim.so chrome-lin/
cp $OUTPUTFILE_LIN/libvk_swiftshader.so chrome-lin/
cp -r $OUTPUTFILE_LIN/locales/ chrome-lin/locales
cp $OUTPUTFILE_LIN/product_logo_48.png chrome-lin/
cp $OUTPUTFILE_LIN/resources.pak chrome-lin/
cp $OUTPUTFILE_LIN/snapshot_blob.bin chrome-lin/
cp $OUTPUTFILE_LIN/xdg-mime chrome-lin/
cp $OUTPUTFILE_LIN/xdg-settings chrome-lin/
tar -czvf chrome-lin64.tar.gz chrome-lin/
echo Uploading chrome-lin64.tar.gz
$GH release upload $VERSION-$CROMITE_SHA chrome-lin64.tar.gz
echo "::endgroup::"
echo "::group::-------- arm64 symbols"
zip arm64_symbols.zip ${{ env.OUTPUTFILE_ARM64 }}/dump_syms \
${{ env.OUTPUTFILE_ARM64 }}/minidump_stackwalk \
${{ env.OUTPUTFILE_ARM64 }}/libchrome.so
$GH release upload $VERSION-$BROMITE_SHA arm64_symbols.zip
$GH release upload $VERSION-$CROMITE_SHA arm64_symbols.zip
echo "::endgroup::"
# workaround for https://github.com/cli/cli/issues/6599
sleep 30s
TIMESTAMP=$(date +%s -r chrome-win.zip)
echo >updateurl.txt "browser=chromium;os=windows;architecture=64-bit;timestamp=$TIMESTAMP;editor=uazo;channel=stable;repository=https://github.com/uazo/cromite/releases;download=https://github.com/uazo/cromite/releases/latest/download/chrome-win.zip;version=$(cat $OUTPUTFILE_WIN/RELEASE);revision=1;commit=$BROMITE_SHA"
$GH release upload $VERSION-$BROMITE_SHA updateurl.txt
echo >updateurl.txt "browser=chromium;os=windows;architecture=64-bit;timestamp=$TIMESTAMP;editor=uazo;channel=stable;repository=https://github.com/uazo/cromite/releases;download=https://github.com/uazo/cromite/releases/latest/download/chrome-win.zip;version=$(cat $OUTPUTFILE_WIN/RELEASE);revision=1;commit=$CROMITE_SHA"
$GH release upload $VERSION-$CROMITE_SHA updateurl.txt
$GH release edit $VERSION-$BROMITE_SHA -t $VERSION-$BROMITE_SHA
$GH release edit $VERSION-$BROMITE_SHA --draft=false
$GH release edit $VERSION-$CROMITE_SHA -t $VERSION-$CROMITE_SHA
$GH release edit $VERSION-$CROMITE_SHA --draft=false
VERSION=$(cat ${{ env.OUTPUTFILE_ARM64 }}/RELEASE)
docker push uazo/cromite:$VERSION-$BROMITE_SHA
docker push uazo/cromite-build:$VERSION-$BROMITE_SHA
docker push uazo/cromite:$VERSION-$CROMITE_SHA
docker push uazo/cromite-build:$VERSION-$CROMITE_SHA
1 change: 0 additions & 1 deletion build/LASTCHANGE

This file was deleted.

2 changes: 1 addition & 1 deletion build/RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
120.0.6099.144
120.0.6099.180
1 change: 0 additions & 1 deletion build/RELEASE_COMMIT

This file was deleted.

Loading

0 comments on commit 828c891

Please sign in to comment.