Skip to content

Work under /mnt

Work under /mnt #186

Workflow file for this run

name: tarball
on:
push:
pull_request:
workflow_dispatch:
inputs:
version:
description: Which Chromium version to build
required: true
type: string
env:
VERSION: ${{ inputs.version && inputs.version || (startsWith(github.ref, 'refs/tags/') && github.ref_name || '124.0.6315.2') }}
REMOTE: ${{ (startsWith(github.ref, 'refs/tags/121') || startsWith(github.ref, 'refs/tags/120')) && 'goma' || 'reclient' }}
jobs:
build:
runs-on: ubuntu-22.04
continue-on-error: false
steps:
- name: Mount workspace to /mnt
if: runner.os == 'Linux'
run: |
sudo mkdir /mnt/work
sudo mount --bind /mnt/work ${{ github.workspace }}
sudo chown runner:runner ${{ github.workspace }}
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Checkout Chromium
run: ./checkout.py --revision $VERSION
- name: Create source tarball
run: |
./export_tarball.py chromium-$VERSION --progress
ls -lh *.tar.xz
- name: Upload Binary Files
uses: actions/upload-artifact@v3
with:
path: '*.tar.xz'
retention-days: 1
test:
if: inputs.version
needs: [build]
runs-on: ${{ fromJson('{"linux":"ubuntu-22.04","mac":"macos-13","win":"windows-2022"}')[matrix.targetOs] }}
strategy:
fail-fast: false
matrix:
targetOs: [linux, mac, win]
targetCpu: [x64, arm64]
steps:
- name: Mount workspace to /mnt
if: runner.os == 'Linux'
run: |
sudo mkdir /mnt/work
sudo mount --bind /mnt/work ${{ github.workspace }}
sudo chown runner:runner ${{ github.workspace }}
- name: Checkout
uses: actions/checkout@v3
with:
repository: photoionization/build_chromium
submodules: recursive
- uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install python dependencies
run: python -m pip install pyyaml httplib2
- name: Use XCode 15
if: runner.os == 'macOS'
run: |
XCODE_APP=$(find /Applications -maxdepth 1 -type d -name "Xcode_15.*" -print -quit)
echo 'Using' $XCODE_APP
sudo xcode-select --switch $XCODE_APP
- name: Install Linux Dependencies
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install gperf
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Download Files
uses: actions/download-artifact@v3
- name: Checkout Chromium
shell: bash
run: python3 bootstrap.py --tarball-url 'file:///${{ github.workspace }}'"/artifact/chromium-$VERSION.tar.xz" --target-cpu ${{ matrix.targetCpu }}
- name: Setup Reclient
if: env.REMOTE == 'reclient'
env:
ELECTRON_RBE_JWT: ${{ secrets.RBE_SECRET }}
run: node reclient.js login
- name: Setup GOMA
if: env.REMOTE == 'goma'
shell: bash
env:
SECRET_FILE_CONTENT: ${{ secrets.GOMA_OAUTH2_CONFIG }}
run: |
printf "$SECRET_FILE_CONTENT" > ~/.goma_oauth2_config
node goma.js
- name: Build Chromium
run: |
python3 gn_gen.py --${{ env.REMOTE }} --target-cpu ${{ matrix.targetCpu }}
python3 build.py
release:
if: startsWith(github.ref, 'refs/tags/')
needs: [build]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: python -m pip install feedparser
- name: Find release notes
run: ./find_release_notes.py $VERSION > body.html
- name: Download Files
uses: actions/download-artifact@v3
- name: Release
uses: ncipollo/release-action@v1
with:
name: Chromium ${{ github.ref_name }}
bodyFile: body.html
artifacts: artifact/*.tar.xz
artifactErrorsFailBuild: true