diff options
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..f7c750a --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,91 @@ +# Copied in from Moubootaur Legends's Hercules .gitlab-ci.yml +stages: + - build + - test + +variables: &base_vars + DEBIAN_COMMON_PACKAGES: make git gcc g++ + # Depth of clone. If no tag is made after this many commits, then + # the git describe call and version header generation will fail. + GIT_DEPTH: 100 # Will break again eventually. + +.prerequisites: &prerequisites + before_script: + - uname -a + - apt-get update + - apt-get install -y -qq $INSTALL_PACKAGES $DEBIAN_COMMON_PACKAGES + + +# Active server OS? +re:ubuntu1804:build: + <<: *prerequisites + stage: build + image: ubuntu:18.04 + variables: + <<: *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)" + - ./configure --user + - make + - whoami + - make install + artifacts: # required for test stage + untracked: true + expire_in: 30 mins + + + + +# Next server OS? +re:ubuntu2204:build: + <<: *prerequisites + stage: build + image: ubuntu:22.04 + variables: + <<: *base_vars + INSTALL_PACKAGES: python2 + script: + - ln -s /usr/bin/python2 /usr/bin/python + - git submodule update --init + - git fetch -t + - printf "Building TMW Athena version %s\n" "$(git describe --tags HEAD)" + - ./configure --user + - make + - whoami + - make install + artifacts: # required for test stage + untracked: true + expire_in: 30 mins + + + + +# Disabled. fails with: +# (1) GDB failing to resolve a type +# (2) /usr/bin/ld: Dwarf Error: Can't find .debug_ranges section. +.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 |