-
Notifications
You must be signed in to change notification settings - Fork 69
87 lines (71 loc) · 2.84 KB
/
ci.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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
macos:
strategy:
fail-fast: false
matrix:
version: [12, 11]
runs-on: macos-${{ matrix.version }}
steps:
- uses: actions/checkout@main
- run: brew update
- run: brew install cmake ninja tree
- run: echo "VCPKG_ROOT=$HOME/.vcpkg/root" >> "$GITHUB_ENV"
- run: echo "PATH=$VCPKG_ROOT:$PATH" >> "$GITHUB_ENV"
- run: install -d $VCPKG_ROOT
- run: git clone https://github.com/microsoft/vcpkg.git $VCPKG_ROOT
- run: cd $VCPKG_ROOT && ./bootstrap-vcpkg.sh
- run: vcpkg install curl openssl libyaml libgit2 libarchive libqrencode
- run: cmake --version
- run: cmake -S . -B build.d -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX=./output -DBUILD_TESTING=OFF -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_VERBOSE_MAKEFILE=ON
- run: cmake --build build.d
- run: cmake --install build.d
- run: tree output
ubuntu:
strategy:
fail-fast: false
matrix:
tag: [20.04, 22.04]
runs-on: ubuntu-latest
container: ubuntu:${{ matrix.tag }}
env:
DEBIAN_FRONTEND: noninteractive
TZ: Europe/London
steps:
- uses: actions/checkout@main
- run: apt -y update
- run: apt -y install pkg-config g++ linux-headers-generic cmake ninja-build tree git curl zip unzip tar
- run: echo "VCPKG_ROOT=$HOME/.vcpkg/root" >> "$GITHUB_ENV"
- run: echo "PATH=$VCPKG_ROOT:$PATH" >> "$GITHUB_ENV"
- run: install -d $VCPKG_ROOT
- run: git clone https://github.com/microsoft/vcpkg.git $VCPKG_ROOT
- run: cd $VCPKG_ROOT && ./bootstrap-vcpkg.sh
- run: vcpkg install curl openssl libyaml libgit2 libarchive libqrencode
- run: cmake --version
- run: cmake -S . -B build.d -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX=./output -DBUILD_TESTING=OFF -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_VERBOSE_MAKEFILE=ON
- run: cmake --build build.d
- run: cmake --install build.d
- run: tree output
codacy-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: codacy/codacy-analysis-cli-action@master
with:
output: results.sarif
format: sarif
# Adjust severity of non-security issues
gh-code-scanning-compat: true
# Force 0 exit code to allow SARIF file generation
# This will handover control about PR rejection to the GitHub side
max-allowed-issues: 2147483647
# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@main
with:
sarif_file: results.sarif