Draft: Enable CI/CD build for both mainnet and testnet versions #631
1 changed files with 28 additions and 6 deletions
|
|
@ -9,7 +9,7 @@ stages:
|
||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
|
|
||||||
build:
|
code-checkout:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- rm -rf .git/modules/docs .git/modules/libraries/fc ./docs ./libraries/fc
|
- rm -rf .git/modules/docs .git/modules/libraries/fc ./docs ./libraries/fc
|
||||||
|
|
@ -17,7 +17,12 @@ build:
|
||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
- rm -rf build
|
- rm -rf build
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
|
||||||
|
build:
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- mkdir build/mainnet
|
||||||
|
- cd build/mainnet
|
||||||
- cmake -DCMAKE_BUILD_TYPE=Release ..
|
- cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||||
- make -j$(nproc)
|
- make -j$(nproc)
|
||||||
artifacts:
|
artifacts:
|
||||||
|
|
@ -26,16 +31,33 @@ build:
|
||||||
- build/libraries/
|
- build/libraries/
|
||||||
- build/programs/
|
- build/programs/
|
||||||
- build/tests/
|
- build/tests/
|
||||||
|
|
||||||
|
build-testnet:
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- mkdir build/testnet
|
||||||
|
- cd build/testnet
|
||||||
|
- cmake -DBOOST_ROOT="$BOOST_ROOT" -DCMAKE_BUILD_TYPE=Release -DBUILD_PEERPLAYS_TESTNET=1 ..
|
||||||
|
- make -j$(nproc)
|
||||||
|
artifacts:
|
||||||
|
untracked: true
|
||||||
|
paths:
|
||||||
|
- build/libraries/
|
||||||
|
- build/programs/
|
||||||
|
- build/tests/
|
||||||
tags:
|
tags:
|
||||||
- builder
|
- builder
|
||||||
|
|
||||||
dockerize:
|
dockerize:
|
||||||
stage: build
|
stage: build
|
||||||
|
variables:
|
||||||
|
IMAGE: $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA
|
||||||
|
before_script:
|
||||||
|
- docker info
|
||||||
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||||
script:
|
script:
|
||||||
- docker build . -t $DOCKER_REPO:$CI_COMMIT_REF_NAME
|
- docker build -t $IMAGE .
|
||||||
- docker login -u $DOCKER_USER -p $DOCKER_PASS
|
- docker push $IMAGE
|
||||||
- docker push $DOCKER_REPO:$CI_COMMIT_REF_NAME
|
|
||||||
- docker logout
|
|
||||||
tags:
|
tags:
|
||||||
- builder
|
- builder
|
||||||
when: manual
|
when: manual
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue