-
Notifications
You must be signed in to change notification settings - Fork 13
136 lines (132 loc) · 4.69 KB
/
ci.yaml
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
name: Non regression tests for Zipper
on:
workflow_dispatch:
branches:
- master
push:
branches:
- master
pull_request:
branches:
- master
jobs:
#############################################################################
### Linux
#############################################################################
non_regression_linux:
name: Non regression on Linux
runs-on: ubuntu-20.04
steps:
- name: Checkout Zipper
uses: actions/checkout@v3
with:
submodules: true
- name: Install system packages
run: |
sudo apt-get update
sudo apt-get install pkg-config lcov libdw-dev ninja-build
- name: Download, configure and install Google test
run: |
wget https://github.com/google/googletest/archive/release-1.11.0.tar.gz
tar xf release-1.11.0.tar.gz
cd googletest-release-1.11.0
cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON .
sudo make install
- name: Build Zipper
run: |
make download-external-libs
make compile-external-libs
make -j`nproc --all`
make demos -j`nproc --all`
- name: Installation
run: |
sudo make install
- name: Non regression
run: |
cd tests
make -j`nproc --all`
./build/Zipper-UnitTest
- name: Check the demo
run: |
cd doc/demos/Unzipper
echo "1234" | ./build/demo_unzip -p -f -o /tmp ../../../tests/issues/issue_05_password.zip
ls /tmp/issue_05/foo/bar /tmp/issue_05/Nouveau\ dossier/ /tmp/issue_05/Nouveau\ fichier\ vide
- name: Check if the library can be linked against a project
run: |
git clone https://github.com/Lecrapouille/LinkAgainstMyLibs.git --recurse-submodules --depth=1
cd LinkAgainstMyLibs/Zipper
make -j`nproc --all`
./build/Zipper
ls ziptest.zip /tmp/somefile.txt
cat /tmp/somefile.txt
#############################################################################
### MacOS X
#############################################################################
non_regression_macos:
name: Non regression on MacOS X
runs-on: macos-latest
steps:
- name: Checkout Zipper
uses: actions/checkout@v3
with:
submodules: true
- name: Install system packages
run: |
brew install pkg-config ninja
- name: Download, configure and install Google test
run: |
wget https://github.com/google/googletest/archive/release-1.11.0.tar.gz
tar xf release-1.11.0.tar.gz
cd googletest-release-1.11.0
cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON .
sudo make install
- name: Build Zipper
run: |
make download-external-libs
make compile-external-libs
make -j`sysctl -n hw.logicalcpu`
# FIXME https://github.com/Lecrapouille/zipper/issues/10
# make demos -j`sysctl -n hw.logicalcpu`
- name: Non regression
run: |
cd tests
make -j`nproc --all`
./build/Zipper-UnitTest
# FIXME https://github.com/Lecrapouille/zipper/issues/10
# - name: Check the demo
# run: |
# cd doc/demos/Unzipper
# echo "1234" | ./build/demo_unzip -p -f -o /tmp ../../../tests/issues/issue_05_password.zip
# ls /tmp/issue_05/foo/bar /tmp/issue_05/Nouveau\ dossier/ /tmp/issue_05/Nouveau\ fichier\ vide
- name: Check if the library can be linked against a project
run: |
git clone https://github.com/Lecrapouille/LinkAgainstMyLibs.git --recurse-submodules --depth=1
cd LinkAgainstMyLibs/Zipper
make -j`nproc --all`
./build/Zipper
ls ziptest.zip /tmp/somefile.txt
cat /tmp/somefile.txt
#############################################################################
### Windows
#############################################################################
# non_regression_windows:
# name: Non regression on Windows
# runs-on: windows-2022
# steps:
# - name: Add path for finding cl.exe
# uses: ilammy/msvc-dev-cmd@v1.10.0
# - name: Checkout Zipper
# uses: actions/checkout@v3
# with:
# submodules: true
# - name: Build Zipper
# shell: powershell
# run: |
# make download-external-libs
# make compile-external-libs
# make -j1
# - name: Non regression
# run: |
# cd build
# Test-Path -Path \a\zipper\build\libzipper.a.2.0.0
# Test-Path -Path \a\zipper\build\libzipper.dll.2.0