Added .gitlab-ci.yml & CHANGELOG.md

This commit is contained in:
Patrix
2022-06-29 21:43:57 +02:00
parent daa7a84cf9
commit 226d16844f
2 changed files with 85 additions and 0 deletions

85
.gitlab-ci.yml Normal file
View File

@@ -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"