summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2023-12-14 23:22:52 +0100
committerFedja Beader <fedja@protonmail.ch>2024-03-09 15:54:10 +0100
commite7db3e0dc44a98e616d4535bdd0f58db8d65a9d6 (patch)
treeec372755b5efc528839c224c4563acc3570170ab
parentcc086e08c128763762b3fa67c6d2771b88d84d9d (diff)
downloadtmwa-generate-client-codeWithCI.tar.gz
tmwa-generate-client-codeWithCI.tar.bz2
tmwa-generate-client-codeWithCI.tar.xz
tmwa-generate-client-codeWithCI.zip
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.yml38
1 files changed, 37 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 67559b8..40767c8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,7 @@
# Copied in from Moubootaur Legends's Hercules .gitlab-ci.yml
stages:
- build
+ - test
variables: &base_vars
DEBIAN_COMMON_PACKAGES: make git gcc g++
@@ -10,7 +11,6 @@ variables: &base_vars
.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
@@ -25,6 +25,7 @@ re:ubuntu1804:build:
<<: *base_vars
INSTALL_PACKAGES: python
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)"
@@ -32,6 +33,12 @@ re:ubuntu1804:build:
- make
- whoami
- make install
+ artifacts: # required for test stage
+ untracked: true
+ expire_in: 30 mins
+
+
+
# Next server OS?
re:ubuntu2204:build:
@@ -50,3 +57,32 @@ re:ubuntu2204:build:
- make
- whoami
- make install
+ artifacts: # required for test stage
+ untracked: true
+ expire_in: 30 mins
+
+
+
+
+re:ubuntu1804:test:
+ <<: *prerequisites
+ stage: test
+ image: ubuntu:18.04
+ variables:
+ <<: *base_vars
+ INSTALL_PACKAGES: python gdb
+ script:
+ - printf "Testing TMW Athena version %s\n" "$(git describe --tags HEAD)"
+ - make test
+
+re:ubuntu2204:test:
+ <<: *prerequisites
+ stage: test
+ image: ubuntu:22.04
+ variables:
+ <<: *base_vars
+ INSTALL_PACKAGES: python2 gdb
+ script:
+ - ln -s /usr/bin/python2 /usr/bin/python
+ - printf "Testing TMW Athena version %s\n" "$(git describe --tags HEAD)"
+ - make test