Skip to content

Commit 9d56817

Browse files
MinyazevRmrbean-bremen
authored andcommitted
Add ccache to CI
1 parent 7a7d90f commit 9d56817

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,18 @@ jobs:
5454
- name: Checkout PythonQt
5555
uses: actions/checkout@v4
5656

57+
- name: Ccache
58+
uses: hendrikmuhs/ccache-action@v1.2.14
59+
with:
60+
key: ${{ runner.os }}-ubuntu-${{ matrix.container_version }}
61+
5762
- name: Build PythonQt
5863
run: |
5964
export QT_SELECT=qt5
6065
echo ======= SYSTEM INFO ========
6166
uname -a; gcc --version | grep "gcc"; python3 --version; qmake --version
6267
echo ============================
63-
qmake -r PythonQt.pro CONFIG+=release CONFIG+=force_debug_info \
68+
qmake -r PythonQt.pro CONFIG+=ccache CONFIG+=release CONFIG+=force_debug_info \
6469
CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address \
6570
PYTHON_VERSION=$(python3 --version | cut -d " " -f 2 | cut -d "." -f1,2) \
6671
PYTHON_DIR=$(which python3 | xargs dirname | xargs dirname)
@@ -202,6 +207,11 @@ jobs:
202207
- name: Checkout PythonQt
203208
uses: actions/checkout@v4
204209

210+
- name: Ccache
211+
uses: hendrikmuhs/ccache-action@v1.2.14
212+
with:
213+
key: ${{ runner.os }}-${{ matrix.qt-version }}
214+
205215
- name: Detect exact versions
206216
id : versions
207217
run : |
@@ -230,7 +240,7 @@ jobs:
230240
for i in "python${{ steps.versions.outputs.PYTHON_VERSION_SHORT }}-embed" "python${{ steps.versions.outputs.PYTHON_VERSION_SHORT }}" \
231241
"python${PYTHON_VERSION_MAJOR}-embed" "python${PYTHON_VERSION_MAJOR}"
232242
do if pkg-config --exists "$i"; then PYTHON_PKGCONFIG_NAME="$i"; break; fi; done
233-
qmake CONFIG+=${{ matrix.configuration }} CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address \
243+
qmake CONFIG+=ccache CONFIG+=${{ matrix.configuration }} CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address \
234244
PYTHON_VERSION=${{ steps.versions.outputs.PYTHON_VERSION_SHORT }} \
235245
PYTHON_DIR="$pythonLocation" \
236246
PKGCONFIG+=$PYTHON_PKGCONFIG_NAME \

.github/workflows/build_latest.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
- master
77
pull_request:
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
913
defaults:
1014
run:
1115
shell: bash
@@ -43,6 +47,12 @@ jobs:
4347
- name: Checkout PythonQt
4448
uses: actions/checkout@v4
4549

50+
- name: Ccache
51+
uses: hendrikmuhs/ccache-action@v1.2.14
52+
with:
53+
key: ${{ runner.os }}-${{ matrix.qt-version }}
54+
if: ${{ matrix.os == 'ubuntu' }}
55+
4656
- name: Set environment
4757
id: setenv
4858
run: |
@@ -60,7 +70,7 @@ jobs:
6070
if: ${{ matrix.os == 'ubuntu' }}
6171
run: |
6272
cd generator
63-
qmake -r generator.pro CONFIG+=release CONFIG-=debug_and_release CONFIG+=force_debug_info \
73+
qmake -r generator.pro CONFIG+=ccache CONFIG+=release CONFIG-=debug_and_release CONFIG+=force_debug_info \
6474
CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address
6575
make -j $(nproc)
6676
@@ -93,7 +103,7 @@ jobs:
93103
echo ======= SYSTEM INFO ========
94104
uname -a; gcc --version | grep "gcc"; python3 --version; qmake --version
95105
echo ============================
96-
qmake -r PythonQt.pro CONFIG+=release CONFIG+=force_debug_info \
106+
qmake -r PythonQt.pro CONFIG+=ccache CONFIG+=release CONFIG+=force_debug_info \
97107
CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address \
98108
PYTHON_VERSION=$(python3 --version | cut -d " " -f 2 | cut -d "." -f1,2) \
99109
PYTHON_DIR=$(which python3 | xargs dirname | xargs dirname)

0 commit comments

Comments
 (0)