diff --git a/.github/workflows/build-images.yaml b/.github/workflows/build-images.yaml index e7762276..7fd0f20a 100644 --- a/.github/workflows/build-images.yaml +++ b/.github/workflows/build-images.yaml @@ -9,7 +9,7 @@ permissions: repository-projects: none security-events: none statuses: none - + on: workflow_dispatch: inputs: @@ -17,13 +17,13 @@ on: description: 'chromium version' required: false default: '' - schedule: + schedule: - cron: '0 1 * * *' - + env: VERSION: ${{ github.event.inputs.version }} NEW_VERSION: ${{ null }} - + name: Builds and pushes tagged image to DockerHub jobs: generate_build_deps: @@ -39,7 +39,7 @@ jobs: firefox mysql-server-core-8.0 mono-devel podman \ powershell sudo apt-get autoremove - + - name: Checkout repo uses: actions/checkout@v2 with: @@ -51,7 +51,7 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - + - name: Check versions shell: bash run: | @@ -59,7 +59,7 @@ jobs: VERSION=$(curl -s https://omahaproxy.appspot.com/all.json | jq '.[] | select(.os | contains("win64")) | .versions[] | select(.channel | contains("stable")) | .current_version' | xargs) echo "VERSION=$VERSION" >> $GITHUB_ENV fi - + - name: Building build-deps container ${{ env.VERSION }} shell: bash run: | @@ -73,11 +73,11 @@ jobs: --build-arg HTTP_PROXY="$PROXY_ADDR" \ --no-cache \ cromite/tools/images/build-deps/. - + docker push uazo/build-deps:$VERSION echo "NEW_VERSION=$VERSION" >> $GITHUB_ENV fi - fi + fi - name: Building chromium container ${{ env.VERSION }} shell: bash @@ -91,7 +91,7 @@ jobs: --build-arg VERSION=$VERSION \ --build-arg HTTP_PROXY="$PROXY_ADDR" \ cromite/tools/images/chr-source/. - + docker push uazo/chromium:$VERSION echo "NEW_VERSION=$VERSION" >> $GITHUB_ENV fi @@ -104,10 +104,7 @@ jobs: 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 - + cd cromite/tools echo ${{ secrets.GITHUB_TOKEN }} | $GH auth login --with-token $GH issue create -t "$VERSION: new chromium version" -b "" - - - diff --git a/.github/workflows/build_cromite.yaml b/.github/workflows/build_cromite.yaml index 45ce8302..456116d0 100644 --- a/.github/workflows/build_cromite.yaml +++ b/.github/workflows/build_cromite.yaml @@ -10,7 +10,7 @@ permissions: repository-projects: none security-events: none statuses: none - + on: workflow_dispatch: inputs: @@ -38,7 +38,7 @@ on: description: 'clangd? [true/false]' required: true default: 'false' - + env: BROMITE_SHA: ${{ github.event.inputs.sha }} REMOVEDOCKERSUPPORT: true @@ -67,15 +67,15 @@ jobs: - name: Get current chromium version shell: bash - run: | + run: | export VERSION=$( cat ./cromite/build/RELEASE ) rm -rf bromite - + echo Current version is $VERSION echo "VERSION=$VERSION" >> $GITHUB_ENV - + cd cromite/tools - + - name: Building build-deps container ${{ env.VERSION }} shell: bash run: | @@ -91,7 +91,7 @@ jobs: cromite/tools/images/build-deps/. fi fi - + - name: Building chromium container ${{ env.VERSION }} shell: bash run: | @@ -121,7 +121,7 @@ jobs: cromite/tools/images/bromite-source/. fi fi - + - name: Building cromite-build container ${{ env.VERSION }}-${{ env.BROMITE_SHA }} shell: bash run: | @@ -137,7 +137,7 @@ jobs: cromite/tools/images/bromite-build/. fi fi - + - name: Mark image to build shell: bash run: | @@ -146,13 +146,13 @@ jobs: docker rmi uazo/cromite-build:build fi docker tag uazo/cromite-build:$VERSION-$BROMITE_SHA uazo/cromite-build:build - + build: runs-on: ${{ github.event.inputs.type }} needs: check_images if: success() timeout-minutes: 1200 - + container: image: uazo/cromite-build:build env: @@ -169,7 +169,7 @@ jobs: WINDOWSSDKDIR: "/win_sdk/10.0.22621.0/Windows Kits/10/" GYP_MSVS_OVERRIDE_PATH: /win_sdk/10.0.22621.0/ # compile in debug mode - TARGET_ISDEBUG: ${{ github.event.inputs.debug }} + TARGET_ISDEBUG: ${{ github.event.inputs.debug }} TARGET_OS: ${{ github.event.inputs.target_os }} USE_KEYSTORE: true KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} @@ -181,8 +181,8 @@ jobs: - /storage/images/${{ github.event.inputs.sha }}/win/x64:/home/lg/working_dir/chromium/src/out/bromite-windows-x86_64 - /tmp/proxy:/tmp/proxy - /win_sdk:/win_sdk - - steps: + + steps: - name: Prepare Build Container shell: bash run: | @@ -195,7 +195,7 @@ jobs: HTTPS_PROXY= http_proxy= https_proxy= - + # set out folder permissions test -d chromium/src/out/bromite-android-arm || sudo mkdir -p chromium/src/out/bromite-android-arm && \ sudo chown lg chromium/src/out && @@ -212,7 +212,7 @@ jobs: test -d chromium/src/out/bromite-android-x86_64 || sudo mkdir -p chromium/src/out/bromite-android-x86_64 && \ sudo chown lg chromium/src/out && sudo chown lg chromium/src/out/bromite-android-x86_64 - + # make kythe output directory test -d $KYTHE_OUTPUT_DIRECTORY || mkdir -p $KYTHE_OUTPUT_DIRECTORY @@ -340,14 +340,14 @@ jobs: $WORKSPACE/ninjatracing/ninjatracing $WORKSPACE/chromium/src/out/bromite-android-x86_64/.ninja_log >$WORKSPACE/chromium/src/out/bromite-android-x86_64/ninja_log_trace.json python3 $WORKSPACE/chromium/src/third_party/catapult/tracing/bin/trace2html $WORKSPACE/chromium/src/out/bromite-android-x86_64/ninja_log_trace.json - + - name: Generate breakpad symbols for 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') }} shell: bash run: | 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 - + echo "::group::-------- generating breakpad symbols" ninja -C out/bromite-android-arm64 minidump_stackwalk dump_syms components/crash/content/tools/generate_breakpad_symbols.py --build-dir=out/bromite-android-arm64 \ @@ -364,9 +364,9 @@ jobs: run: | 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 - + tools/binary_size/supersize archive out/bromite-android-arm64/chrome.size --apk-file out/bromite-android-arm64/apks/ChromePublic.apk -v - + - name: Generate clangd index for Android arm64 if: ${{ github.event.inputs.clangd == 'true' }} shell: bash diff --git a/.github/workflows/check-git-apply.yaml b/.github/workflows/check-git-apply.yaml index 48473551..94c9cc93 100644 --- a/.github/workflows/check-git-apply.yaml +++ b/.github/workflows/check-git-apply.yaml @@ -10,14 +10,14 @@ permissions: # repository-projects: none # security-events: none # statuses: none - + on: push: branches-ignore: - 'ci' paths: - 'build/**' - + workflow_dispatch: inputs: rtag: @@ -26,29 +26,29 @@ on: default: '' env: - RTAG: ${{ github.event.inputs.rtag }} + RTAG: ${{ github.event.inputs.rtag }} jobs: build: runs-on: ubuntu-latest steps: - + - name: "Get value from dispatch" run: | if [ -z "${RTAG}" ]; then echo "RTAG=$GITHUB_SHA" >> $GITHUB_ENV echo "RTAG=$RTAG" fi - + - name: Prepare container - run: | + run: | sudo apt update sudo apt install -y wget unzip tar sed dos2unix patchutils wiggle curl - + wget https://github.com/uazo/superpatch/releases/latest/download/SuperPatchUtils.tar.gz tar xfz SuperPatchUtils.tar.gz rm SuperPatchUtils.tar.gz - + 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 @@ -103,41 +103,41 @@ jobs: run: | export HOME=$GITHUB_WORKSPACE cd ~/chromium/src - + export SILENT=true export SKIPAUTOGENERATED=true bash ~/cromite/tools/apply-all-patch.sh || exit 1 - + rm -rf ~/cromite/build/patches-new/ rm ~/cromite/build/bromite_patches_list_new.txt - + - name: Export patches run: | - export HOME=$GITHUB_WORKSPACE + export HOME=$GITHUB_WORKSPACE cd ~/chromium/src - + bash ~/cromite/tools/export-all-patch.sh - + cd ~/cromite rm -rf build/patches/* mv build/patches-new/* build/patches rm -rf build/patches-new/ - + - name: Check differences CHANGES=${{ env.CHANGES }} run: | export HOME=$GITHUB_WORKSPACE - + cd ~/cromite CHANGES=0 && git diff --quiet || CHANGES=1 echo "CHANGES=$CHANGES" >> $GITHUB_ENV - + if [[ CHANGES -eq 1 ]]; then git add build/patches/*.patch git diff --name-only --staged # MESSAGE=$(git diff --name-only --staged) # echo "MESSAGE='$MESSAGE'" >> $GITHUB_ENV fi - + - name: Create Pull Request uses: peter-evans/create-pull-request@dcd5fd746d53dd8de555c0f10bca6c35628be47a #v3.12.0 if: env.CHANGES == '1' diff --git a/.github/workflows/execute-tests.yaml b/.github/workflows/execute-tests.yaml index 04efa0f8..9634b687 100644 --- a/.github/workflows/execute-tests.yaml +++ b/.github/workflows/execute-tests.yaml @@ -10,7 +10,7 @@ permissions: repository-projects: none security-events: none statuses: none - + on: workflow_dispatch: inputs: @@ -18,7 +18,7 @@ on: description: 'uazo/bromite SHA' required: true default: 'ce2f07034a3d3b257e9bada65d8293a6786bb95f' - + env: BROMITE_SHA: ${{ github.event.inputs.sha }} REMOVEDOCKERSUPPORT: true @@ -32,12 +32,12 @@ jobs: shell: bash run: | docker tag uazo/bromite-build:$BROMITE_SHA uazo/bromite-build:test - + exec-test: runs-on: self-hosted needs: get_image if: success() - + container: image: uazo/bromite-build:test env: @@ -50,23 +50,23 @@ jobs: - /storage/images/${{ github.event.inputs.sha }}/out:/home/lg/working_dir/chromium/src/out/bromite:r - /storage/images/${{ github.event.inputs.sha }}/out/tests:/home/lg/working_dir/chromium/src/out/tests options: --device=/dev/kvm - - steps: + + steps: - name: Prepare Test Container shell: bash run: | # set workspace paths PATH=$WORKSPACE/chromium/src/third_party/llvm-build/Release+Asserts/bin:$WORKSPACE/depot_tools/:/usr/local/go/bin:$WORKSPACE/mtool/bin:$PATH cd $WORKSPACE - + # copy artifacts #cd chromium/src #mkdir -p out/bromite #cp -arp $ARTIFACS_DIR/out/* out/bromite - + rm -rf out/tests/* #mkdir -p out/tests - + # reset proxy env #HTTP_PROXY= #HTTPS_PROXY= @@ -77,7 +77,7 @@ jobs: # shell: bash # run: | # sleep infinity - + - name: Execute chrome junit test shell: bash run: | @@ -95,7 +95,7 @@ jobs: sudo chmod 666 /github/home/.android/ tools/android/avd/avd.py install --avd-config ../../generic_android31.textpb -v tools/android/avd/avd.py start --avd-config ../../generic_android31.textpb -v - + - name: Execute unit tests shell: bash run: | @@ -110,7 +110,7 @@ jobs: cd $WORKSPACE/chromium/src pkill -f qemu-system-x86 tools/android/avd/avd.py start --avd-config ../../generic_android31.textpb -v - + - name: Execute instrumentation tests shell: bash run: | diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 49c07198..a50c4f0b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,7 +1,7 @@ name: Release Cromite CI permissions: contents: write - + on: workflow_dispatch: inputs: @@ -13,12 +13,12 @@ on: description: 'runner? [dev/ci]' required: true default: 'ci' - + env: BROMITE_SHA: ${{ github.event.inputs.sha }} REMOVEDOCKERSUPPORT: true USELOCALIMAGE: true - + jobs: release: runs-on: ${{ github.event.inputs.type }} @@ -26,14 +26,14 @@ jobs: OUTPUTFILE_ARM: /storage/images/${{ github.event.inputs.sha }}/android/false/arm/ OUTPUTFILE_ARM64: /storage/images/${{ github.event.inputs.sha }}/android/false/arm64/ OUTPUTFILE_X64: /storage/images/${{ github.event.inputs.sha }}/android/false/x64/ - + steps: - name: Login to Docker Hub uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - + - name: Prepare container run: | wget https://github.com/ericchiang/pup/releases/download/v0.4.0/pup_v0.4.0_linux_amd64.zip @@ -50,7 +50,7 @@ jobs: repository: 'uazo/cromite' path: 'cromite' fetch-depth: 1 - + - name: Create release shell: bash run: | @@ -62,7 +62,7 @@ jobs: GH=gh_2.21.1_linux_amd64/bin/gh wget https://github.com/cli/cli/releases/download/v2.21.1/gh_2.21.1_linux_amd64.tar.gz tar xfz gh_2.21.1_linux_amd64.tar.gz - + echo ${{ secrets.GITHUB_TOKEN }} | $GH auth login --with-token echo "\`\`\`" >note @@ -106,7 +106,7 @@ jobs: $GH release upload $VERSION-$BROMITE_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 - echo "::endgroup::" + echo "::endgroup::" echo "::group::-------- Uploading arm64_ninja_log_trace.html" test $OUTPUTFILE_ARM64/ninja_log_trace.html && \ @@ -147,18 +147,18 @@ jobs: #test chrome-win.zip && rm chrome-win.zip zip -r chrome-win.zip chrome-win/ - + echo Uploading chrome-win.zip $GH release upload $VERSION-$BROMITE_SHA chrome-win.zip 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 echo "::endgroup::" - + # workaround for https://github.com/cli/cli/issues/6599 sleep 30s diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 1b726957..439e7eef 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -5,7 +5,7 @@ on: - cron: '30 1 * * *' workflow_dispatch: - + permissions: issues: write pull-requests: write