Skip to content

Instantly share code, notes, and snippets.

@annulen
Last active October 1, 2020 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save annulen/675c32b8c76a17d2ca4546082705f0de to your computer and use it in GitHub Desktop.
Save annulen/675c32b8c76a17d2ca4546082705f0de to your computer and use it in GitHub Desktop.
name: Build qbat2-deps
on:
push:
branches:
- build_dependencies_docker
env:
IMAGE_NAME: qbat2-deps
jobs:
build_and_tests:
env:
NUMBER_OF_PROCESSORS: 5
RWT_THREADS: 4
RWT_ARGS: fast
runs-on: xeon4c8t
container:
image: ghcr.io/qtwebkit/qbat2-deps:latest
volumes:
- /home/annulen/gha-ccache:/github/home/.ccache
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare dependencies
shell: bash --noprofile --norc -o pipefail -x {0}
run: |
mkdir WebKitBuild
cd WebKitBuild
tar xf /DependenciesQT.tar.xz
- name: ccache configuration
run: |
ccache -p
ccache -z
- name: Run webkit-build
run: |
export PATH=WebKitBuild/DependenciesQT/Root/bin:$PATH
CC=/usr/lib/ccache/clang \
CXX=/usr/lib/ccache/clang++ \
Tools/Scripts/build-webkit --qt
python Tools/BuildSlaveSupport/built-product-archive --platform qt --release archive
- name: ccache stats
run: |
ccache -s
- name: Run tests
run: |
git clone --depth 1 https://github.com/qtwebkit/test-fonts.git
export WEBKIT_TESTFONTS=$(pwd)/test-fonts
Tools/Scripts/run-webkit-tests --no-build \
--qt -1 --no-new-test-results --child-processes=$RWT_THREADS -p \
--no-show-results --results-directory=./layout-test-results $RWT_ARGS
tar czf layout-test-results.tar.gz layout-test-results
- uses: actions/upload-artifact@v2
with:
name: release-archive
path: WebKitBuild/release.zip
- uses: actions/upload-artifact@v2
with:
name: test-results
path: layout-test-results.zip
name: Build qbat2-deps
on:
push:
paths:
- 'Tools/jhbuild/**'
- 'Tools/qt/jhbuild*'
- '.github/workflows/update_qtwebkit_libs.yml'
env:
IMAGE_NAME: qbat2-deps
jobs:
deps:
env:
NUMBER_OF_PROCESSORS: 5
runs-on: xeon4c8t
container:
image: ghcr.io/qtwebkit/qbat2-base:latest
volumes:
- ${{ github.workspace }}/jhbuild-cache:/root/.cache/jhbuild
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run update-qtwebkit-libs
run: |
Tools/Scripts/update-qtwebkit-libs
- name: Prepare archive
run: |
cd WebKitBuild
rm -rf DependenciesQT/Source DependenciesQT/Build
ls -la DependenciesQT
du -hs DependenciesQT
tar cf DependenciesQT.tar DependenciesQT
xz -9 DependenciesQT.tar
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: deps
path: WebKitBuild/DependenciesQT.tar.xz
container:
needs: deps
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: deps
- name: Log into GitHub Container Registry
run: echo "${{ secrets.CR_PAT }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build docker image
run: |
docker build -t $IMAGE_NAME -f- . <<EOF
FROM ghcr.io/qtwebkit/qbat2-base:latest
COPY DependenciesQT.tar.xz .
EOF
- name: Push image to GitHub Container Registry
run: |
IMAGE_ID=ghcr.io/qtwebkit/$IMAGE_NAME
VERSION=latest
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment