1
- name : C/C++ CI
1
+ name : CI
2
2
3
3
on :
4
4
push :
5
5
branches : ['*']
6
6
tags :
7
7
paths_ignore : ['docs/**', '.travis.yml']
8
8
pull_request :
9
+ branches : ['*']
9
10
release :
10
11
types : ['created']
11
12
@@ -15,57 +16,57 @@ defaults:
15
16
16
17
jobs :
17
18
build :
18
- name : ${{ matrix.config.name }}
19
- runs-on : ${{ matrix.config. os }}
19
+ name : ${{ matrix.os }} - SQLCipher ${{ matrix.sqlcipher }}
20
+ runs-on : ${{ matrix.os }}
20
21
strategy :
21
- fail-fast : false
22
+ fail-fast : true
22
23
matrix :
23
- config :
24
- - {name: "ubuntu-20.04", os: "ubuntu-20.04"}
25
-
24
+ os : [ubuntu-20.04]
25
+ sqlcipher : ["0", "1"]
26
26
steps :
27
- - uses : actions/checkout@v2
27
+ - name : Checkout
28
+ uses : actions/checkout@v2
28
29
- name : Install dependencies
29
30
run : |
30
31
sudo apt-get update
31
- sudo apt-get install qttools5-dev libqt5scintilla2-dev libqcustomplot-dev libsqlite3-dev
32
+ sudo apt-get install qttools5-dev libqt5scintilla2-dev libqcustomplot-dev libsqlite3-dev libqt5svg5 libsqlcipher-dev
32
33
- name : Configure CMake
33
34
run : |
34
35
cmake --version
35
36
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
36
37
-DCMAKE_INSTALL_PREFIX=${PWD}/install \
37
38
-DCPACK_PACKAGE_DIRECTORY=${PWD}/package \
38
- -DENABLE_TESTING=ON
39
- - name : make
39
+ -DENABLE_TESTING=ON \
40
+ -Dsqlcipher=${{ matrix.sqlcipher }}
41
+ - name : Run make
40
42
run : cmake --build build --config Release -j --target install
41
43
- name : run tests
42
- run : ctest -C Release
43
- - name : package
44
+ run : ctest -V - C Release --test-dir build
45
+ - name : Package
44
46
run : |
45
47
cmake --build build --config Release -j --target package
46
48
cmake -E remove_directory package/_CPack_Packages
47
- - name : upload package
49
+ - name : Upload package
48
50
uses : actions/upload-artifact@master
49
51
with :
50
- name : pkg-${{ matrix.config.name }}
52
+ name : pkg-${{ matrix.os }}-sqlcipher${{ matrix.sqlcipher }}
51
53
path : package
52
- - name : upload to release page
54
+ - name : Upload to release page
53
55
if : github.event_name == 'release'
54
56
env :
55
- TOKEN : " token ${{ secrets.GITHUB_TOKEN }}"
57
+ GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
56
58
TAG : ${{ github.event.release.tag_name }}
57
59
UPLOAD_URL : ${{ github.event.release.upload_url }}
58
60
run : |
59
61
# Do try this at home! The REST API is documented at
60
62
# https://docs.github.com/en/free-pro-team@latest/rest and you can get a personal
61
63
# access token at https://github.com/settings/tokens
62
- # (set TOKEN to "bearer abcdef1234")
64
+ # (set GITHUB_TOKEN to "bearer abcdef1234")
63
65
# you can get the UPLOAD_URL with a short bash snippet; make sure to set the env var TAG:
64
66
# UPLOAD_URL=$(curl -H 'Accept: application/vnd.github.v3+json' $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/releases/tags/$TAG | jq -r .upload_url)
65
67
UPLOAD_URL=${UPLOAD_URL%\{*} # remove "{name,label}" suffix
66
68
for pkg in package/*.*; do
67
69
NAME=$(basename $pkg)
68
70
MIME=$(file --mime-type $pkg|cut -d ' ' -f2)
69
- curl -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: $TOKEN " -H "Content-Type: $MIME" --data-binary @$pkg $UPLOAD_URL?name=$NAME
71
+ curl -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: token $GITHUB_TOKEN " -H "Content-Type: $MIME" --data-binary @$pkg $UPLOAD_URL?name=$NAME
70
72
done
71
-
0 commit comments