-
-
Notifications
You must be signed in to change notification settings - Fork 647
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some small improvements to gha (#363)
* Improves the GHA overall performance - Disable ccache for Windows as it doesn't work - Add sscache for Windows - Adjust some cmake flags to work with sscache Signed-off-by: Renato Foot <[email protected]>
- Loading branch information
Showing
8 changed files
with
109 additions
and
77 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
name: Analysis - Codacy Security Scan | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,20 +8,23 @@ on: | |
- '**.py' | ||
|
||
env: | ||
VCPKG_BUILD_TYPE: release | ||
CMAKE_BUILD_PARALLEL_LEVEL: 2 | ||
MAKEFLAGS: '-j 2' | ||
NODE_OPTIONS: ' --max-old-space-size=8192 ' | ||
|
||
jobs: | ||
codeql: | ||
name: CodeQL | ||
runs-on: ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-20.04] | ||
language: ['cpp', 'python'] | ||
include: | ||
- language: cpp | ||
buildtype: linux-release | ||
|
||
steps: | ||
- name: Checkout repository | ||
|
@@ -46,15 +49,12 @@ jobs: | |
sudo update-alternatives --set gcc /usr/bin/gcc-11 | ||
- name: CCache | ||
if: ${{ matrix.language == 'cpp' }} | ||
id: ccache | ||
uses: actions/cache@v3 | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
path: $HOME/.ccache | ||
key: ccache-${{ runner.os }}-RelWithDebInfo-${{ hashFiles('**/src') }} | ||
max-size: "1G" | ||
key: ccache-${{ matrix.os }}-${{ matrix.buildtype }} | ||
restore-keys: | | ||
ccache-${{ runner.os }}-RelWithDebInfo- | ||
ccache-${{ runner.os }}- | ||
ccache-${{ matrix.os }} | ||
- name: Restore artifacts, or setup vcpkg (do not install any package) | ||
if: ${{ matrix.language == 'cpp' }} | ||
|
@@ -70,8 +70,8 @@ jobs: | |
if: ${{ matrix.language == 'cpp' }} | ||
uses: lukka/run-cmake@v10 | ||
with: | ||
configurePreset: linux-debug | ||
buildPreset: linux-debug | ||
configurePreset: ${{ matrix.buildtype }} | ||
buildPreset: ${{ matrix.buildtype }} | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ on: | |
- main | ||
|
||
env: | ||
VCPKG_BUILD_TYPE: release | ||
CMAKE_BUILD_PARALLEL_LEVEL: 2 | ||
MAKEFLAGS: '-j 2' | ||
|
||
|
@@ -45,14 +44,12 @@ jobs: | |
sudo update-alternatives --set gcc /usr/bin/gcc-11 | ||
- name: CCache | ||
id: ccache | ||
uses: actions/cache@v3 | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
path: $HOME/.ccache | ||
key: ccache-${{ matrix.os }}-${{ matrix.buildtype }}-${{ hashFiles('**/src') }} | ||
max-size: "1G" | ||
key: ccache-${{ matrix.os }}-${{ matrix.buildtype }} | ||
restore-keys: | | ||
ccache-${{ matrix.os }}-${{ matrix.buildtype }}- | ||
ccache-${{ matrix.os }}- | ||
ccache-${{ matrix.os }} | ||
- name: Restore artifacts and install vcpkg | ||
uses: lukka/run-vcpkg@v10 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ on: | |
- main | ||
|
||
env: | ||
VCPKG_BUILD_TYPE: release | ||
CMAKE_BUILD_PARALLEL_LEVEL: 2 | ||
MAKEFLAGS: '-j 2' | ||
|
||
|
@@ -27,21 +26,30 @@ jobs: | |
packages: > | ||
boost-asio boost-iostreams boost-system boost-filesystem | ||
boost-variant boost-lockfree cryptopp curl jsoncpp | ||
luajit libmariadb pugixml spdlog libzippp | ||
luajit libmariadb pugixml spdlog libzippp sccache | ||
- os: windows-2022 | ||
triplet: x64-windows | ||
packages: > | ||
boost-asio boost-iostreams boost-system boost-filesystem | ||
boost-variant boost-lockfree cryptopp curl jsoncpp | ||
luajit libmariadb pugixml spdlog libzippp | ||
luajit libmariadb pugixml spdlog libzippp sccache | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: CCache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
max-size: "1G" | ||
variant: "sccache" | ||
key: ccache-${{ matrix.os }}-${{ matrix.buildtype }} | ||
restore-keys: | | ||
ccache-${{ matrix.os }} | ||
- name: Remove Windows pre-installed MySQL | ||
run: rm -r -fo C:/mysql* | ||
if: contains( matrix.os, 'windows') | ||
run: rm -r -fo C:/mysql* | ||
|
||
- name: Restore artifacts and install vcpkg | ||
uses: lukka/run-vcpkg@v10 | ||
|
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
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
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