chore(CI)[sc-97669]: update the QTVERSION to match the actual version… #26
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: CI | |
on: | |
pull_request: | |
branches: [WD_1.X_dev] | |
paths-ignore: | |
- '**/*.md' | |
push: | |
tags: | |
- v* | |
env: | |
# 5.15.3 is the version of Qt you get when you install qt5 libraries via `apt install` | |
QTVERSION: 5.15.3 | |
jobs: | |
tar-src: | |
outputs: | |
short_version: ${{ steps.config.outputs.short_version }} | |
name: "Tar source" | |
runs-on: ubuntu-latest | |
steps: | |
- id: config | |
run: | | |
echo "artefact_name=qtwebdriver-${QTVERSION}-src.tar.gz" >> $GITHUB_OUTPUT | |
echo "short_version=${QTVERSION}" >> $GITHUB_OUTPUT | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
path: qtwebdriver-src | |
- name: Archive | |
run: tar --create --xz --file "${{ steps.config.outputs.artefact_name }}" --exclude-vcs qtwebdriver-src | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "${{ steps.config.outputs.artefact_name }}" | |
path: "${{ github.workspace }}/${{ steps.config.outputs.artefact_name }}" | |
build: | |
name: "Build ${{ matrix.config.os }}" | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- os: "ubuntu-22.04" | |
std: "17" | |
steps: | |
- id: config | |
run: echo "artefact_name=qtwebdriver-${QTVERSION}-cpp${{ matrix.config.std }}-${{ matrix.config.os }}-x64.tar.gz" >> $GITHUB_OUTPUT | |
- name: Install dependencies | |
run: | | |
sudo apt-get -o Acquire::Retries=3 update | |
sudo apt-get -o Acquire::Retries=3 install -y \ | |
gyp \ | |
libegl1-mesa-dev \ | |
libglib2.0-dev \ | |
libgstreamer1.0-dev \ | |
libgstreamer-plugins-base1.0-dev \ | |
libhyphen-dev \ | |
libicu-dev \ | |
libjpeg-dev \ | |
libpng-dev \ | |
libunwind-dev \ | |
libxslt1-dev \ | |
- name: Install Qt | |
run: | | |
sudo apt-get -o Acquire::Retries=3 install -y \ | |
qtbase5-dev \ | |
qtdeclarative5-dev \ | |
qtmultimedia5-dev \ | |
qtpositioning5-dev \ | |
libqt5sensors5-dev \ | |
libqt5webchannel5 \ | |
qt5-qmake \ | |
- name: Install Qtwebkit | |
run: | | |
curl -L https://github.com/constructpm/qtwebkit-build/releases/download/v5.212.0-1/qtwebkit-d1c854e-cpp17-ubuntu-22.04-x64.tar.gz | sudo tar xvJ -C /usr/include/x86_64-linux-gnu | |
# Move the files we downloaded so their locations match the locations used by the other Qt libraries we installed earlier | |
sudo mv /usr/include/x86_64-linux-gnu/qt5/include/* /usr/include/x86_64-linux-gnu/qt5/ | |
sudo rmdir /usr/include/x86_64-linux-gnu/qt5/include/ | |
sudo mv /usr/include/x86_64-linux-gnu/qt5/lib/cmake/* /usr/lib/x86_64-linux-gnu/cmake/ | |
sudo rmdir /usr/include/x86_64-linux-gnu/qt5/lib/cmake/ | |
sudo mv /usr/include/x86_64-linux-gnu/qt5/lib/pkgconfig/* /usr/lib/x86_64-linux-gnu/pkgconfig/ | |
sudo rmdir /usr/include/x86_64-linux-gnu/qt5/lib/pkgconfig/ | |
sudo mv /usr/include/x86_64-linux-gnu/qt5/lib/* /usr/lib/x86_64-linux-gnu/ | |
sudo rmdir /usr/include/x86_64-linux-gnu/qt5/lib/ | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Build | |
working-directory: ${{ github.workspace }} | |
run: ./build.sh | |
- name: Archive | |
working-directory: ${{ github.workspace }} | |
run: | | |
mv out qtwebdriver | |
tar cJfv "${{ steps.config.outputs.artefact_name }}" qtwebdriver | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "${{ steps.config.outputs.artefact_name }}" | |
path: "${{ github.workspace }}/${{ steps.config.outputs.artefact_name }}" | |
release: | |
if: contains(github.ref, 'tags/v') | |
name: Create Release | |
runs-on: ubuntu-latest | |
needs: | |
- tar-src | |
- build | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
steps: | |
- name: Create Release | |
id: create_release | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
upload: | |
if: contains(github.ref, 'tags/v') | |
name: "Upload ${{ matrix.config.artefact }} to release" | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- artefact: qtwebdriver-${{ needs.tar-src.outputs.short_version }}-src.tar.gz | |
- artefact: qtwebdriver-${{ needs.tar-src.outputs.short_version }}-cpp17-ubuntu-22.04-x64.tar.gz | |
needs: | |
- tar-src | |
- release | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: "${{ matrix.config.artefact }}" | |
path: ./ | |
- name: Upload to Release | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.release.outputs.upload_url }} | |
asset_path: "./${{ matrix.config.artefact }}" | |
asset_name: "${{ matrix.config.artefact }}" | |
asset_content_type: application/x-gtar |