From daec1292cd334014ba1c2c5d8b6f6267770942e3 Mon Sep 17 00:00:00 2001 From: Netkas Date: Sun, 29 Jan 2023 21:45:12 -0500 Subject: [PATCH] Added .gitlab-ci.yml --- .gitlab-ci.yml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..c416e4a --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,43 @@ +image: php:8.1 + +before_script: + # Install some stuff that the image doesn't come with + - apt update -yqq + - apt install git libpq-dev libzip-dev zip make wget gnupg -yqq + + # Install phive + - wget -O phive.phar https://phar.io/releases/phive.phar + - wget -O phive.phar.asc https://phar.io/releases/phive.phar.asc + - gpg --keyserver hkps://keys.openpgp.org --recv-keys 0x9D8A98B29B2D5D79 + - gpg --verify phive.phar.asc phive.phar + - chmod +x phive.phar + - mv phive.phar /usr/local/bin/phive + + # Install phab + - phive install phpab --global --trust-gpg-keys 0x2A8299CE842DD38C + + # Install the latest version of ncc (Nosial Code Compiler) + - git clone https://git.n64.cc/nosial/ncc.git + - cd ncc + - make redist + - php build/src/INSTALL --auto --install-composer + - cd .. && rm -rf ncc + +build: + script: + - ncc build --config release --log-level debug + artifacts: + paths: + - build/ + rules: + - if: $CI_COMMIT_BRANCH + +release: + stage: deploy + script: + - ncc build --config release --log-level debug + artifacts: + paths: + - build/ + rules: + - if: $CI_COMMIT_TAG \ No newline at end of file