From 4545bbb283f9e70f46e4287e6773f7ab07791a02 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 14 Apr 2019 12:36:16 +0200 Subject: Improve CI configuration This separates the build stage from the test stage, and publishes a test coverage report as a page. --- .gitlab-ci.yml | 161 +++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 116 insertions(+), 45 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d29dec0a..33ae378e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,91 +1,162 @@ -arm-linux-gnueabihf: +stages: + - build + - test + - deploy + +.build_template: &build_definition + stage: build + artifacts: + paths: + - build/ + - .lock-waf* + +.test_template: &test_definition + stage: test + artifacts: + paths: + - build/coverage + + +arm: + <<: *build_definition image: drobilla/debian-stretch + script: python ./waf configure build -dsT variables: CC: "arm-linux-gnueabihf-gcc" CXX: "arm-linux-gnueabihf-g++" - script: - - python ./waf configure build test -dsT --wrapper=qemu-arm -aarch64-linux-gnu: +test:arm: + <<: *test_definition image: drobilla/debian-stretch + script: python ./waf test --wrapper=qemu-arm + dependencies: + - arm + + +aarch64: + <<: *build_definition + image: drobilla/debian-stretch + script: python ./waf configure build -dsT variables: CC: "aarch64-linux-gnu-gcc" CXX: "aarch64-linux-gnu-g++" - script: - - python ./waf configure build test -dsT --wrapper=qemu-aarch64 -lin_dbg: +test:aarch64: + <<: *test_definition image: drobilla/debian-stretch - script: - - python ./waf configure build test -dsT + script: python ./waf test --wrapper=qemu-aarch64 + dependencies: + - aarch64 -lin_rel: - image: drobilla/debian-stretch - script: - - python ./waf configure build test -sT -lin_dbg_st: +amd64_dbg: + <<: *build_definition image: drobilla/debian-stretch - script: - - python ./waf configure build test -dsT --static-progs --no-shared + script: python ./waf configure build -dsT -lin_rel_st: +test:amd64_dbg: + <<: *test_definition image: drobilla/debian-stretch - script: - - python ./waf configure build test -sT --static-progs --no-shared + script: python ./waf test + dependencies: + - amd64_dbg + -lin_dbg_no_posix: +amd64_rel: + <<: *build_definition image: drobilla/debian-stretch - script: - - python ./waf configure build test -dsT --no-posix + script: python ./waf configure build -sT -lin_rel_no_posix: +test:amd64_rel: + <<: *test_definition image: drobilla/debian-stretch - script: - - python ./waf configure build test -sT --no-posix + script: python ./waf test + dependencies: + - amd64_rel + -lin_dbg_st_no_posix: +amd64_static: + <<: *build_definition image: drobilla/debian-stretch - script: - - python ./waf configure build test -dsT --no-posix --static-progs --no-shared + script: python ./waf configure build -sT --no-posix --static-progs -lin_rel_st_no_posix: +test:amd64_static: + <<: *test_definition image: drobilla/debian-stretch - script: - - python ./waf configure build test -sT --no-posix --static-progs --no-shared + script: python ./waf test + dependencies: + - amd64_static + mac_dbg: - script: - - python ./waf configure build test -dsT --no-coverage + <<: *build_definition + script: python ./waf configure build -dsT --no-coverage tags: - macos -mac_rel: - script: - - python ./waf configure build test -sT --no-coverage +test:mac_dbg: + <<: *test_definition + script: python ./waf test + dependencies: + - mac_dbg tags: - macos -mac_dbg_no_posix: - script: - - python ./waf configure build test -dsT --no-posix --no-coverage + +mac_rel: + <<: *build_definition + script: python ./waf configure build -sT --no-coverage tags: - macos -mac_rel_no_posix: - script: - - python ./waf configure build test -sT --no-posix --no-coverage +test:mac_rel: + <<: *test_definition + script: python ./waf test + dependencies: + - mac_rel tags: - macos + win_dbg: + <<: *build_definition script: - - python ./waf configure build test -dT --no-coverage + - python ./waf configure build -dT --no-coverage tags: - windows +test:win_dbg: + <<: *test_definition + script: python ./waf test + dependencies: + - win_dbg + tags: + - windows + + win_rel: - script: - - python ./waf configure build test -T --no-coverage + <<: *build_definition + script: python ./waf configure build -T --no-coverage tags: - windows + +test:win_rel: + <<: *test_definition + script: python ./waf test + dependencies: + - win_rel + tags: + - windows + + +pages: + stage: deploy + script: mv build/coverage/ public/ + dependencies: + - test:amd64_dbg + artifacts: + expire_in: 30 days + paths: + - public + only: + - master -- cgit v1.2.1