X Tutup
Skip to content

Commit 0ec0a7c

Browse files
Add gitlab ci config
1 parent c305972 commit 0ec0a7c

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.gitlab-ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
stages:
3+
- test
4+
5+
test:windows:386:
6+
stage: test
7+
tags:
8+
- windows
9+
script:
10+
- export CI_ARCH=386
11+
- scripts/ci.sh
12+
13+
test:windows:amd64:
14+
stage: test
15+
tags:
16+
- windows
17+
script:
18+
- export CI_ARCH=amd64
19+
- scripts/ci.sh

scripts/ci.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/sh -xe
2+
3+
7za | head -2
4+
gcc -v
5+
cppcheck --error-exitcode=1 src
6+
7+
export ELEVATE_VERSION=head
8+
if [ -n "$CI_BUILD_TAG" ]; then
9+
export ELEVATE_VERSIOn=$CI_BUILD_TAG
10+
fi
11+
export ELEVATE_CFLAGS="-DELEVATE_VERSION=\\\"$ELEVATE_VERSION\\\""
12+
13+
14+
if [ "$CI_ARCH" = "amd64" ]; then
15+
export PATH=/mingw64/bin:$PATH
16+
else
17+
export PATH=/mingw32/bin:$PATH
18+
fi
19+
20+
make
21+
file elevate.exe
22+
23+
if [ -n "$CI_BUILD_TAG" ]; then
24+
7za a elevate.7z elevate.exe
25+
echo $CI_BUILD_TAG > LATEST
26+
fi
27+

0 commit comments

Comments
 (0)
X Tutup