Skip to content

Commit bcbd437

Browse files
committed
CI: Add CI pipeline
1 parent c6ebbaf commit bcbd437

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

.gitlab-ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
stages:
2+
- lint
3+
- build
4+
5+
workflow:
6+
rules:
7+
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
8+
- if: $CI_COMMIT_TAG
9+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
10+
11+
lint_commit_messages:
12+
image: ubuntu:latest
13+
stage: lint
14+
before_script:
15+
- apt-get -y update
16+
- apt-get -y install git
17+
script:
18+
- git fetch
19+
- FAILED=""
20+
- "SUBJECTS=$(git log --pretty=%s origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME..HEAD)"
21+
- "SUBJECTS_REGEX='^(BREAK|FEAT|FIX|FORMAT|DOCS|TEST|MAINT|CI|REFAC|BUILD|TRANSLATION|CHANGE|REVERT): .*$'"
22+
- "while IFS= read -r line; do if [[ \"$line\" =~ $SUBJECTS_REGEX ]]; then echo \"passed '$line'\"; else echo \"failed '$line'\"; FAILED=\"$FAILED,$line\"; fi; done <<< \"$SUBJECTS\""
23+
- "if [[ -n \"$FAILED\" ]]; then echo \"$FAILED\"; exit 1; fi;"
24+
rules:
25+
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
26+
when: always
27+
- when: never
28+
29+
test_build:
30+
image: ubuntu:latest
31+
stage: build
32+
before_script:
33+
- apt-get -y update
34+
- apt-get -y install build-essential autoconf libtool
35+
script:
36+
- echo "Build renamenoise"
37+
- ./autogen.sh
38+
- ./configure
39+
- make
40+
- echo "Apply noise suppression to test sample"
41+
- ./examples/renamenoise_demo ./sample/babble_15dB.pcm ./sample/renamenoise_babble_15dB.pcm
42+
- sha1sum -c --strict ./sample/CHECKSUMS
43+
- echo "Check exported symbols"
44+
- FAILED=""
45+
- EXPORTED_SYMBOLS=$(nm ./.libs/librenamenoise.a | awk '/ T / {print $3}' | sort)
46+
- "SYMBOL_REGEX='^_?renamenoise.*$'"
47+
- "while IFS= read -r line; do if [[ \"$line\" =~ $SYMBOL_REGEX ]]; then echo \"passed '$line'\"; else echo \"failed '$line'\"; FAILED=\"$FAILED,$line\"; fi; done <<< \"$EXPORTED_SYMBOLS\""
48+
- "if [[ -n \"$FAILED\" ]]; then echo \"$FAILED\"; exit 1; fi;"

sample/CHECKSUMS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
632f09deff708ab6ca67b9e1a0cc1ba8dd759e10 *sample/renamenoise_babble_15dB.pcm

sample/babble_15dB.pcm

3.4 MB
Binary file not shown.

0 commit comments

Comments
 (0)