-
Notifications
You must be signed in to change notification settings - Fork 11
84 lines (75 loc) · 1.99 KB
/
Linux_versions.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
name: Linux_versions
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
Linux_versions:
runs-on: ubuntu-latest
env:
CC: gcc
CXX: g++
strategy:
fail-fast: true
matrix:
jasper-version: [2.0.33, 3.0.3, 4.0.0]
ccompiler: [clang, gcc]
steps:
- name: install-dependencies
run: |
sudo apt-get update
sudo apt-get install libpng-dev zlib1g-dev libjpeg-dev libopenjp2-7-dev
if [[ ${{ matrix.ccompiler }} == "clang" ]]; then
sudo apt-get install clang
fi
- name: cache-jasper
id: cache-jasper
uses: actions/cache@v3
with:
path: ~/jasper
key: jasper-${{ runner.os }}-${{ matrix.jasper-version }}
- name: checkout-jasper
if: steps.cache-jasper.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: jasper-software/jasper
path: jasper
ref: version-${{ matrix.jasper-version }}
- name: build-jasper
if: steps.cache-jasper.outputs.cache-hit != 'true'
run: |
if [[ ${{ matrix.ccompiler }} == "clang" ]]; then
export CC=clang
elif [[ ${{ matrix.ccompiler }} == "gcc" ]]; then
export CC=gcc
fi
cd jasper
mkdir cmake_build
cd cmake_build
cmake .. -DCMAKE_INSTALL_PREFIX=~/jasper
make -j2
make install
- name: checkout
uses: actions/checkout@v3
with:
path: g2c
- name: build
run: |
if [[ ${{ matrix.ccompiler }} == "clang" ]]; then
export CC=clang
elif [[ ${{ matrix.ccompiler }} == "gcc" ]]; then
export CC=gcc
fi
cd g2c
mkdir build
cd build
cmake -DJasper_ROOT=~/jasper -DENABLE_OpenJPEG=ON ..
make -j2 VERBOSE=1
- name: test
run: |
set -e
cd $GITHUB_WORKSPACE/g2c/build
ctest --verbose --output-on-failure --rerun-failed