forked from davidshepherd7/qtwebdriver
-
Notifications
You must be signed in to change notification settings - Fork 1
155 lines (136 loc) · 4.4 KB
/
main.yml
File metadata and controls
155 lines (136 loc) · 4.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
---
name: CI
on:
pull_request:
branches: [WD_1.X_dev]
paths-ignore:
- '**/*.md'
push:
tags:
- v*
env:
# 6.7.1 is the latest version of Qt we have built
QTVERSION: 6.7.1
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 -o Acquire::Retries=3 update
sudo apt -o Acquire::Retries=3 install -y \
gyp \
libdbus-1-dev \
libegl1-mesa-dev \
libglib2.0-dev \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libharfbuzz-icu0 \
libhyphen-dev \
libicu-dev \
libjpeg-dev \
libpng-dev \
libunwind-dev \
libxslt1-dev \
libwebpdemux2 \
libwoff1 \
libxkbcommon-dev
- name: Install Qt
run: |
curl -L https://github.com/constructpm/qt-build/releases/download/v6.7.1-1/qt-6.7.1-cpp17-ubuntu-22.04-x64.tar.gz | sudo tar xvJ -C /opt
- name: Install Qtwebkit
run: |
curl -L https://github.com/constructpm/qtwebkit-build/releases/download/v6.212.0-1/qtwebkit-ee690e4-cpp17-ubuntu-22.04-x64.tar.gz | sudo tar xvJ -C /opt
- 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/create-release@v1.0.0
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/upload-release-asset@v1.0.1
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