2022-01-17 19:38:04 +05:30
|
|
|
name: Release Bromite CI
|
2022-01-17 22:26:42 +05:30
|
|
|
permissions:
|
|
|
|
contents: write
|
2022-01-17 19:47:01 +05:30
|
|
|
|
2022-01-17 19:38:04 +05:30
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
sha:
|
|
|
|
description: 'uazo/bromite SHA'
|
|
|
|
required: true
|
|
|
|
default: '0a8ff322d6e9d738f7b2fa52618b178081bd100d'
|
|
|
|
build:
|
|
|
|
description: 'arch [arm64/x64]'
|
|
|
|
required: true
|
2022-01-17 19:47:37 +05:30
|
|
|
default: 'arm64'
|
2022-01-17 19:38:04 +05:30
|
|
|
type:
|
|
|
|
description: 'runner? [dev/ci]'
|
|
|
|
required: true
|
|
|
|
default: 'ci'
|
|
|
|
|
|
|
|
env:
|
|
|
|
BROMITE_SHA: ${{ github.event.inputs.sha }}
|
|
|
|
REMOVEDOCKERSUPPORT: true
|
|
|
|
USELOCALIMAGE: true
|
|
|
|
GOMAJOBS: 60
|
2022-01-17 21:57:11 +05:30
|
|
|
|
2022-01-17 19:38:04 +05:30
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
runs-on: ${{ github.event.inputs.type }}
|
|
|
|
env:
|
2022-10-17 12:33:42 +05:30
|
|
|
OUTPUTFILE: /storage/images/android/${{ github.event.inputs.build }}/${{ github.event.inputs.sha }}
|
2022-01-17 19:51:53 +05:30
|
|
|
APK: ${{ github.event.inputs.build }}_ChromePublic.apk
|
2022-01-17 19:38:04 +05:30
|
|
|
|
|
|
|
steps:
|
2022-01-17 21:57:11 +05:30
|
|
|
- name: Prepare container
|
|
|
|
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
|
2022-03-09 13:29:27 +05:30
|
|
|
BRANCH=$(curl https://github.com/uazo/bromite/branch_commits/$BROMITE_SHA | ./pup -p li.branch:last-child a text{} | xargs)
|
2022-03-09 13:20:29 +05:30
|
|
|
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
|
2022-01-17 21:57:11 +05:30
|
|
|
|
2022-10-21 15:13:27 +05:30
|
|
|
wget https://github.com/cli/cli/releases/download/v2.18.1/gh_2.18.1_linux_amd64.tar.gz
|
|
|
|
tar xfz gh_2.18.1_linux_amd64.tar.gz
|
2022-01-17 21:57:11 +05:30
|
|
|
|
2022-01-17 22:20:12 +05:30
|
|
|
- name: Checkout 'uazo/buildtools'
|
2022-01-17 21:57:11 +05:30
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
2022-01-17 22:21:07 +05:30
|
|
|
repository: 'uazo/bromite-buildtools'
|
2022-01-17 21:57:11 +05:30
|
|
|
path: 'bromite'
|
|
|
|
fetch-depth: 1
|
|
|
|
|
2022-01-17 21:32:34 +05:30
|
|
|
- name: Create release
|
2022-01-17 20:20:19 +05:30
|
|
|
shell: bash
|
|
|
|
run: |
|
2022-10-21 15:13:27 +05:30
|
|
|
GH=gh_2.18.1_linux_amd64/bin/gh
|
|
|
|
WINOUT=/storage/images/win/x64/$BROMITE_SHA/
|
2022-01-17 22:03:18 +05:30
|
|
|
VERSION=v$(cat ${{ env.OUTPUTFILE }}/RELEASE)-${{ github.event.inputs.build }}
|
2022-10-21 18:45:15 +05:30
|
|
|
|
2022-10-21 18:38:53 +05:30
|
|
|
cd bromite
|
2022-10-21 18:45:15 +05:30
|
|
|
|
|
|
|
GH=gh_2.18.1_linux_amd64/bin/gh
|
|
|
|
wget https://github.com/cli/cli/releases/download/v2.18.1/gh_2.18.1_linux_amd64.tar.gz
|
|
|
|
tar xfz gh_2.18.1_linux_amd64.tar.gz
|
|
|
|
|
2022-10-21 15:13:27 +05:30
|
|
|
echo ${{ secrets.GITHUB_TOKEN }} | $GH auth login --with-token
|
|
|
|
|
|
|
|
echo "\`\`\`" >note
|
|
|
|
echo "this is not the official release of bromite but a test version." >>note
|
|
|
|
echo "you can try it at your own risk." >>note
|
|
|
|
echo "\`\`\`" >>note
|
|
|
|
|
|
|
|
$GH release create $VERSION-$BROMITE_SHA --notes-file note -d
|
2022-10-21 18:48:36 +05:30
|
|
|
|
|
|
|
# android
|
|
|
|
sudo cp ${{ env.OUTPUTFILE }}/apks/ChromePublic.apk ChromePublic.apk
|
|
|
|
sudo chown runner ChromePublic.apk
|
|
|
|
mv ChromePublic.apk $APK
|
2022-10-21 19:31:49 +05:30
|
|
|
echo Uploading $APK
|
2022-10-21 15:13:27 +05:30
|
|
|
$GH release upload $VERSION-$BROMITE_SHA $APK
|
2022-10-21 19:31:49 +05:30
|
|
|
|
|
|
|
echo Uploading chrome.size
|
2022-11-26 15:06:06 +05:30
|
|
|
test $VERSION-$BROMITE_SHA $OUTPUTFILE/chrome.size && \
|
|
|
|
$GH release upload $VERSION-$BROMITE_SHA $OUTPUTFILE/chrome.size
|
2022-10-21 15:13:27 +05:30
|
|
|
|
2022-10-21 19:31:49 +05:30
|
|
|
echo Uploading arm64_ninja_log_trace.html
|
2022-11-26 15:06:06 +05:30
|
|
|
test $OUTPUTFILE/ninja_log_trace.html && \
|
|
|
|
cp $OUTPUTFILE/ninja_log_trace.html arm64_ninja_log_trace.html && \
|
|
|
|
$GH release upload $VERSION-$BROMITE_SHA arm64_ninja_log_trace.html
|
2022-10-21 15:13:27 +05:30
|
|
|
|
2022-10-21 18:48:36 +05:30
|
|
|
# windows
|
2022-10-21 15:13:27 +05:30
|
|
|
mkdir chrome-win/
|
|
|
|
cp $WINOUT/*.manifest chrome-win/
|
|
|
|
cp $WINOUT/chrome.dll chrome-win/
|
|
|
|
cp $WINOUT/chrome.exe chrome-win/
|
|
|
|
cp $WINOUT/chrome_100_percent.pak chrome-win/
|
|
|
|
cp $WINOUT/chrome_200_percent.pak chrome-win/
|
|
|
|
cp $WINOUT/chrome_elf.dll chrome-win/
|
|
|
|
cp $WINOUT/chrome_proxy.exe chrome-win/
|
|
|
|
cp $WINOUT/chrome_pwa_launcher.exe chrome-win/
|
|
|
|
cp $WINOUT/chrome_wer.dll chrome-win/
|
|
|
|
cp "/win_sdk/10.0.20348.0/Windows Kits/10/Redist/D3D/x64/d3dcompiler_47.dll" chrome-win/
|
|
|
|
cp $WINOUT/elevation_service.exe chrome-win/
|
|
|
|
cp "$WINOUT/First Run" chrome-win/
|
|
|
|
cp $WINOUT/headless_lib_data.pak chrome-win/
|
|
|
|
cp $WINOUT/icudtl.dat chrome-win/
|
|
|
|
cp $WINOUT/libEGL.dll chrome-win/
|
|
|
|
cp $WINOUT/libGLESv2.dll chrome-win/
|
|
|
|
cp $WINOUT/Logo.png chrome-win/
|
|
|
|
cp $WINOUT/mojo_core.dll chrome-win/
|
|
|
|
cp $WINOUT/notification_helper.exe chrome-win/
|
|
|
|
cp $WINOUT/resources.pak chrome-win/
|
|
|
|
cp $WINOUT/SmallLogo.png chrome-win/
|
|
|
|
cp $WINOUT/snapshot_blob.bin chrome-win/
|
|
|
|
cp $WINOUT/VkICD_mock_icd.dll chrome-win/
|
|
|
|
cp $WINOUT/VkLayer_khronos_validation.dll chrome-win/
|
|
|
|
cp $WINOUT/vk_swiftshader.dll chrome-win/
|
|
|
|
cp $WINOUT/vulkan-1.dll chrome-win/
|
|
|
|
cp -r $WINOUT/locales chrome-win/locales
|
|
|
|
|
|
|
|
zip -r chrome-win.zip chrome-win/
|
2022-10-21 19:31:49 +05:30
|
|
|
|
|
|
|
echo Uploading chrome-win.zip
|
2022-10-21 15:13:27 +05:30
|
|
|
$GH release upload $VERSION-$BROMITE_SHA chrome-win.zip
|
2022-11-26 15:03:27 +05:30
|
|
|
|
|
|
|
# workaround for https://github.com/cli/cli/issues/6599
|
|
|
|
sleep 30s
|
2022-10-21 15:13:27 +05:30
|
|
|
|
|
|
|
TIMESTAMP=$(date +%s -r chrome-win.zip)
|
2022-10-21 15:29:39 +05:30
|
|
|
echo >updateurl.txt "browser=chromium;os=windows;architecture=64-bit;timestamp=$TIMESTAMP;editor=uazo;channel=stable;repository=https://github.com/uazo/bromite-buildtools/releases;download=https://github.com/uazo/bromite-buildtools/releases/latest/download/chrome-win.zip;version=$(cat $WINOUT/RELEASE);revision=1;commit=$BROMITE_SHA"
|
2022-10-21 15:13:27 +05:30
|
|
|
$GH release upload $VERSION-$BROMITE_SHA updateurl.txt
|
|
|
|
|
|
|
|
$GH release edit $VERSION-$BROMITE_SHA -t $VERSION-$BROMITE_SHA
|
2022-10-21 19:48:22 +05:30
|
|
|
$GH release edit $VERSION-$BROMITE_SHA --draft=false
|
2022-10-21 15:13:27 +05:30
|
|
|
|