diff options
author | Fedja Beader <fedja@protonmail.ch> | 2023-12-14 23:22:52 +0100 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2024-01-28 17:25:09 +0100 |
commit | 803539ae48a2199864a7f36d572e612df3986a4d (patch) | |
tree | d4a00da1d2da6b9dbae3e3eb8ef1424c22f94418 | |
parent | b8108eaa34bddf41e3788f11430eba9004d7d482 (diff) | |
download | tmwa-803539ae48a2199864a7f36d572e612df3986a4d.tar.gz tmwa-803539ae48a2199864a7f36d572e612df3986a4d.tar.bz2 tmwa-803539ae48a2199864a7f36d572e612df3986a4d.tar.xz tmwa-803539ae48a2199864a7f36d572e612df3986a4d.zip |
Add CI test stage
Squashed with:
Pass artifacts (well, the whole repo) to test stage
YAML syntax error. Since I saw a glimpse of the repo being reinitialised
two tries ago, perhaps it saves everything tracked and just adding
untracked files should be enough.
Have to specify which image to use, else it uses default and fails with
linking errors.
Have to reinstall everything in the new image.
Though not strictly required, but it's good to have a working git describe output in logs.
gdb is required for tests, too
-rw-r--r-- | .gitlab-ci.yml | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5430c64..1719df6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,13 +1,14 @@ # Copied in from Moubootaur Legends's Hercules .gitlab-ci.yml stages: - build + - test variables: &base_vars DEBIAN_COMMON_PACKAGES: make python3 git gcc g++ + GIT_DEPTH: 100 # Will break again eventually. .prerequisites: &prerequisites before_script: - - echo "Building TMW Athena $CI_BUILD_NAME" - uname -a - apt-get update - apt-get install -y -qq $INSTALL_PACKAGES $DEBIAN_COMMON_PACKAGES @@ -16,17 +17,31 @@ variables: &base_vars variables: <<: *base_vars -re:debian-stable: +re:debian-stable:build: <<: *prerequisites stage: build image: debian:stable variables: <<: *base_vars - GIT_DEPTH: 100 # Will break again eventually. script: + - echo "Building TMW Athena $CI_BUILD_NAME" - git submodule update --init - git fetch -t - printf "Building TMW Athena version %s\n" "$(git describe --tags HEAD)" - ./configure --user - make - make install + artifacts: # required for test stage + untracked: true + expire_in: 30 mins + +re:debian-stable:test: + <<: *prerequisites + stage: test + image: debian:stable + variables: + <<: *base_vars + INSTALL_PACKAGES: gdb + script: + - printf "Testing TMW Athena version %s\n" "$(git describe --tags HEAD)" + - make test |