Skip to content

Commit 31f5117

Browse files
committed
Add variables for building debug and release
1 parent 334a866 commit 31f5117

File tree

3 files changed

+12
-24
lines changed

3 files changed

+12
-24
lines changed

.github/scripts/setup_build_variables.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ BUILD_DATE=$(date +"%a %b %d %Y")
66
VERSION_NUMBER=$(grep "project.*" CMakeLists.txt | egrep -o "${VERSION_REGEX}")
77
WORKSPACE="$GITHUB_WORKSPACE"
88
INSTALL_PREFIX="$WORKSPACE/tmp"
9+
BUILD_TYPE="$MATRIX_BUILD_TYPE"
910

10-
echo "BUILD_TYPE=Debug" >> $GITHUB_ENV
11+
echo "BUILD_TYPE=$BUILD_TYPE" >> $GITHUB_ENV
1112
echo "BUILD_TIME=$BUILD_TIME" >> $GITHUB_ENV
1213
echo "BUILD_DATE=$BUILD_DATE" >> $GITHUB_ENV
1314
echo "WORKSPACE=$WORKSPACE" >> $GITHUB_ENV

.github/workflows/linux.yml

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,11 @@ on:
77
- "v*"
88

99
jobs:
10-
build:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v2
15-
16-
- name: Install Qt
17-
uses: jurplel/install-qt-action@v2
18-
with:
19-
version: '5.15.2'
20-
host: 'linux'
21-
install-deps: 'true'
22-
23-
- name: Install dependencies
24-
run: sudo apt-get install tesseract-ocr libtesseract-dev
25-
26-
- name: Build
27-
run: |
28-
mkdir build
29-
cd build
30-
cmake .. && make
31-
3210
package-rpm:
3311
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
build-type: [ debug, release ]
3415
steps:
3516
- name: Checkout
3617
uses: actions/checkout@v2
@@ -66,6 +47,9 @@ jobs:
6647
6748
package-deb:
6849
runs-on: ubuntu-latest
50+
strategy:
51+
matrix:
52+
build-type: [ debug, release ]
6953
steps:
7054
- name: Checkout
7155
uses: actions/checkout@v2

.github/workflows/windows.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ on:
77
- "v*"
88

99
jobs:
10-
build:
10+
package-zip:
11+
strategy:
12+
matrix:
13+
build-type: [ debug, release ]
1114
runs-on: windows-latest
1215
steps:
1316
- name: Checkout

0 commit comments

Comments
 (0)