forked from davidshepherd7/qtwebdriver
-
Notifications
You must be signed in to change notification settings - Fork 0
141 lines (128 loc) · 4.23 KB
/
main.yml
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
---
name: CI
on:
pull_request:
branches: [WD_1.X_dev]
paths-ignore:
- '**/*.md'
push:
tags:
- v*
env:
QTVERSION: 5.15.0-lts
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: curl -L https://github.com/constructpm/qt-build/releases/download/v5.15.8-lts-lgpl-1/qt-5.15.8-lts-lgpl-cpp17-${{ matrix.config.os }}-x64.tar.gz | sudo tar -xJC /opt
- name: Install Qtwebkit
run: curl -L https://github.com/constructpm/qtwebkit-build/releases/download/v5.212.0-1/qtwebkit-d1c854e-cpp17-${{ matrix.config.os }}-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/[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