Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
0x17 committed Nov 9, 2023
2 parents 83867e5 + 363ef5d commit bda6265
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 38 deletions.
38 changes: 30 additions & 8 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -336,23 +336,45 @@ doxygen-html:

#=======================================================================================================================

deploy-github:
when: manual
deploy-gitlab-github:
stage: deploy
when: manual
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $CI_COMMIT_BRANCH == 'main'
when: on_success
tags: [linux]
needs: [build-leg, build-dac, build-wei, apigenerator]
image:
name: registry.gams.com/devel/gdx/leg/builder-deploy:latest
entrypoint: [""] # prevent startup.sh
script:
- ls
- GDX_TAG_NAME="`python3 ci/changelog_head.py tag_name`"
- GDX_RELEASE_NAME="${GDX_TAG_NAME}"
- GDX_DESCRIPTION="`python3 ci/changelog_head.py description`"
- PATH="/opt/github-release:${PATH}"
- github-release
- cp Release/gdxcclib64.dll .
- cp apifiles/*.h apifiles/*.c apifiles/*.cpp .
# - GITHUB_TOKEN=${GITHUB_TOKEN} github-release -v release -u GAMS-dev -r gdx -t example-tag -d "some text." -n "Example release"
- >
GITHUB_TOKEN=${GITHUB_TOKEN}
github-release
-v
release
-u GAMS-dev
-r gdx
-t "${GDX_TAG_NAME}"
-d "${GDX_DESCRIPTION}"
-n "${GDX_RELEASE_NAME}"
- sleep 10s # make sure the release is available to reference
- cp Release/gdxcclib64.dll apifiles/*.h apifiles/*.c apifiles/*.cpp .
- |
for fn in libgdxcclib64.so gdxcclib64.dll libgdxcclib64.dylib gclgms.h gcmutex.h gdxcc.h gdxcc.c gdxcclib.cpp
do
GITHUB_TOKEN=${GITHUB_TOKEN} github-release -v upload -R -u GAMS-dev -r gdx -t example-tag -n $fn -f $fn
GITHUB_TOKEN=${GITHUB_TOKEN} github-release -v upload -R -u GAMS-dev -r gdx -t "${GDX_TAG_NAME}" -n $fn -f $fn
done
- >
release-cli
create
--name "${GDX_RELEASE_NAME}"
--tag-name "${GDX_TAG_NAME}"
--description "${GDX_DESCRIPTION}"
--ref "$CI_COMMIT_SHA"
5 changes: 5 additions & 0 deletions changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- 7.9.1:
- First open source technical release of GDX eXPert-level API.
- Added gdxAllowBogusDomains to get flag to ignore using 1-dim sets as domain when their elements are not tracked (see gdxStoreDomainSets).
- Added script to automatically generate C-wrapper from API definition YAML file.
11 changes: 11 additions & 0 deletions ci/changelog_head.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import yaml
import sys

with open('changelog.yaml') as fp:
obj = yaml.load(fp, Loader=yaml.FullLoader)

version, changes = list(obj[0].items())[0]
if sys.argv[1] == 'tag_name':
print(version)
elif sys.argv[1] == 'description':
print('\n'.join('- ' + change for change in changes))
16 changes: 15 additions & 1 deletion ci/images/leg-deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,17 @@
FROM ubuntu:22.04

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -yq bzip2 parallel s3cmd subversion unzip wget
DEBIAN_FRONTEND=noninteractive apt-get install -yq \
bzip2 \
parallel \
s3cmd \
subversion \
unzip \
python3 \
python3-html5lib \
python3-pip \
wget && \
pip3 install --user PyYAML

### Make github-release tool available (https://github.com/github-release/github-release)
RUN wget https://cloud.gams.com/s/NJ26xfETjadAC23/download/github-release-binaries.zip && \
Expand All @@ -12,3 +22,7 @@ RUN wget https://cloud.gams.com/s/NJ26xfETjadAC23/download/github-release-binari
chmod u+x leg-github-release && \
mv leg-github-release /opt/github-release/github-release && \
rm deg-github-release wei-github-release.exe

### Make release-cli tool available (https://docs.gitlab.com/ee/user/project/releases/release_cli.html) \
RUN wget -O /usr/local/bin/release-cli "https://gitlab.com/api/v4/projects/gitlab-org%2Frelease-cli/packages/generic/release-cli/latest/release-cli-linux-amd64" && \
chmod u+x /usr/local/bin/release-cli
29 changes: 0 additions & 29 deletions version.yaml

This file was deleted.

0 comments on commit bda6265

Please sign in to comment.