-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Start building gl-client-py and greenlight-cli
- Loading branch information
Showing
3 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
variables: | ||
GIT_DEPTH: 1 | ||
CI_IMAGE: blockstream/gli-ci | ||
|
||
stages: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
build_gl_client_py: | ||
extends: .build_setup | ||
when: manual | ||
rules: | ||
- if: $CI_COMMIT_TAG =~ /glclientpy_\d{8}(_[1-9][0-9]?)?\-.*/ | ||
before_script: | ||
- export NEW_VER=$(echo ${CI_COMMIT_TAG} | cut -d'-' -f2) | ||
- sed -i "s/^version = \".*\"/version = \"$NEW_VER\"/" libs/gl-client-py/pyproject.toml | ||
- sed -i "s/^version = \".*\"/version = \"$NEW_VER\"/" libs/gl-client-py/Cargo.toml | ||
- . $HOME/.cargo/env # sh doesn't have the correct PATH | ||
script: | ||
- poetry run maturin build -m libs/gl-client-py/Cargo.toml --release || sleep 3600 | ||
- poetry run maturin sdist -m libs/gl-client-py/Cargo.toml | ||
- poetry run maturin upload --username __token__ --password ${PYPI_TOKEN} target/wheels/* | ||
- ls -lh target/wheels | ||
artifacts: | ||
expire_in: 2 weeks | ||
paths: | ||
- "target/wheels/*" | ||
|
||
build_glcli: | ||
extends: .build_setup | ||
when: manual | ||
rules: | ||
- if: $CI_COMMIT_TAG =~ /glcli_\d{8}(_[1-9][0-9]?)?\-.*/ | ||
before_script: | ||
- export NEW_VER=$(echo ${CI_COMMIT_TAG} | cut -d'-' -f2) | ||
- sed -i "s/^version = \".*\"/version = \"$NEW_VER\"/" tools/glcli/pyproject.toml | ||
- . $HOME/.cargo/env # sh doesn't have the correct PATH | ||
script: | ||
- cd tools/glcli | ||
- poetry config pypi-token.pypi ${PYPI_TOKEN} | ||
- poetry build | ||
- poetry publish | ||
- ls -lh dist | ||
artifacts: | ||
expire_in: 2 weeks | ||
paths: | ||
- "tools/glcli/dist/*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters