From 226d16844fbacadd28e0dc9e50b9704ca94eafb6 Mon Sep 17 00:00:00 2001 From: Patrix Date: Wed, 29 Jun 2022 21:43:57 +0200 Subject: [PATCH] Added .gitlab-ci.yml & CHANGELOG.md --- .gitlab-ci.yml | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++ CHANGELOG.md | 0 2 files changed, 85 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 CHANGELOG.md diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..621856f --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,85 @@ +stages: + - build + - release + +build:windows: + stage: build + tags: + - windows + when: manual + script: + - choco install -y cmake --installargs '"ADD_CMAKE_TO_PATH=System"' + - $env:Path += ";C:\Program Files\CMake\bin" + - cmake . -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN.cmake" + - cmake --build . --config Release + after_script: + - $env = "${TOOLCHAIN}_JOB_ID=$CI_JOB_ID" -replace "-", "_" + - Add-Content -Path job.env -Value $env + parallel: + matrix: + - TOOLCHAIN: [windows-x86, windows-x64] + artifacts: + name: sqmodule + paths: + - Release/sqmodule.*.dll + expire_in: never + reports: + dotenv: job.env + +build:linux: + stage: build + image: registry.gitlab.com/gothicmultiplayerteam/buildimage:ubuntu-18.04 + when: manual + script: + - cmake . -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN.cmake" + - cmake --build . && exit $? + after_script: + - echo "${TOOLCHAIN}_JOB_ID=$CI_JOB_ID" | tr - _ >> job.env + parallel: + matrix: + - TOOLCHAIN: [linux-x86, linux-x64, linux-arm, linux-arm64] + artifacts: + name: sqmodule + paths: + - sqmodule.* + expire_in: never + reports: + dotenv: job.env + +release: + stage: release + image: registry.gitlab.com/gitlab-org/release-cli:latest + when: manual + needs: + - job: build:linux + artifacts: true + - job: build:windows + artifacts: true + variables: + TAG: '0.1' + script: + - echo "Create Release $TAG" + release: + tag_name: '$TAG' + description: "./CHANGELOG.md" + assets: + links: + - name: "sqmodule.x86.dll" + url: "https://gitlab.com/GothicMultiplayerTeam/modules/squirrel-template/-/jobs/$windows_x86_JOB_ID/artifacts/download" + link_type: "package" + - name: "sqmodule.x64.dll" + url: "https://gitlab.com/GothicMultiplayerTeam/modules/squirrel-template/-/jobs/$windows_x64_JOB_ID/artifacts/download" + link_type: "package" + - name: "sqmodule.x86.so" + url: "https://gitlab.com/GothicMultiplayerTeam/modules/squirrel-template/-/jobs/$linux_x86_JOB_ID/artifacts/download" + link_type: "package" + - name: "sqmodule.x64.so" + url: "https://gitlab.com/GothicMultiplayerTeam/modules/squirrel-template/-/jobs/$linux_x64_JOB_ID/artifacts/download" + link_type: "package" + - name: "sqmodule.arm.so" + url: "https://gitlab.com/GothicMultiplayerTeam/modules/squirrel-template/-/jobs/$linux_arm_JOB_ID/artifacts/download" + link_type: "package" + - name: "sqmodule.arm64.so" + url: "https://gitlab.com/GothicMultiplayerTeam/modules/squirrel-template/-/jobs/$linux_arm64_JOB_ID/artifacts/download" + link_type: "package" + diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e69de29