-
Notifications
You must be signed in to change notification settings - Fork 12
151 lines (131 loc) · 4.01 KB
/
make.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
142
143
144
145
146
147
148
149
150
151
name: build
on:
push:
branches: [master]
jobs:
build:
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu, macos, windows]
config: [Release]
include:
- nul: /dev/null
- runs-on: macos
os-name: macos
- runs-on: windows
os-name: windows
exe: .exe
- runs-on: ubuntu
os-name: linux
runs-on: ${{matrix.runs-on}}-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true
- name: Build project
run: make release
- name: Test project
run: make test
continue-on-error: true
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{matrix.os-name}}-convimg
path: bin/convimg${{matrix.exe}}
nightly-release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Linux
uses: actions/download-artifact@v4
with:
name: linux-convimg
path: ${{github.workspace}}/linux/
- name: Download CEdev Windows
uses: actions/download-artifact@v4
with:
name: windows-convimg
path: ${{github.workspace}}/windows/
- name: Download CEdev macOS
uses: actions/download-artifact@v4
with:
name: macos-convimg
path: ${{github.workspace}}/macos/
- name: Create Zips
run: |
cd ${{github.workspace}}/linux && zip -r9 linux-convimg.zip *
cd ${{github.workspace}}/windows && zip -r9 windows-convimg.zip *
cd ${{github.workspace}}/macos && zip -r9 macos-convimg.zip *
- name: Update nightly release
uses: pyTooling/Actions/releaser@main
with:
tag: nightly
rm: true
token: ${{secrets.GITHUB_TOKEN}}
files: |
linux/linux-convimg.zip
windows/windows-convimg.zip
macos/macos-convimg.zip
coverity-scan:
runs-on: ubuntu-latest
if: "contains(github.event.head_commit.message, 'coverity')"
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 1
- name: Download Coverity Build Tool
run: |
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=mateoconlechuga%2Fconvimg" -O cov-analysis-linux64.tar.gz
mkdir cov-analysis-linux64
tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
- name: Build project with cov-build
run: |
export PATH=`pwd`/cov-analysis-linux64/bin:$PATH
cov-build --dir cov-int make release
- name: Submit project build to Coverity Scan
run: |
tar czvf convimg.tgz cov-int
curl \
--form token=$TOKEN \
--form email="[email protected]" \
--form [email protected] \
--form version="Major Release" \
--form description="`./bin/convimg -v`" \
https://scan.coverity.com/builds?project=mateoconlechuga%2Fconvimg
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
codeql-scan:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: cpp
config-file: ./.github/codeql/codeql-config.yml
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"