Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nm-reactor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eduardo Trujillo
nm-reactor
Commits
86c85cf9
Verified
Commit
86c85cf9
authored
3 years ago
by
Eduardo Trujillo
Browse files
Options
Downloads
Patches
Plain Diff
chore: Add initial .gitlab-ci.yml
parent
2ba715aa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#213
failed
3 years ago
Stage: format
Stage: build
Stage: lint
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+111
-0
111 additions, 0 deletions
.gitlab-ci.yml
with
111 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
111
−
0
View file @
86c85cf9
stages
:
-
format
-
build
-
lint
-
test
-
release
variables
:
# Package version can only contain numbers (0-9), and dots (.).
# Must be in the format of X.Y.Z, i.e. should match /\A\d+\.\d+\.\d+\z/ regular expresion.
# See https://docs.gitlab.com/ee/user/packages/generic_packages/#publish-a-package-file
PACKAGE_VERSION
:
"
${CI_COMMIT_TAG}"
LINUX_AMD64_BINARY
:
"
nm-reactor-linux-amd64-${PACKAGE_VERSION}"
PACKAGE_REGISTRY_URL
:
"
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/nm-reactor/${PACKAGE_VERSION}"
.rust_template
:
&rust_template
before_script
:
-
export CARGO_HOME="$CI_PROJECT_DIR/cargo"
-
rustup --version
-
rustc --version
-
cargo --version
rust-nightly
:
stage
:
build
image
:
rustlang/rust:nightly
needs
:
[]
cache
:
key
:
"
$CI_COMMIT_REF_SLUG"
paths
:
-
cargo/
-
target/
<<
:
*rust_template
script
:
-
cargo build --release --verbose
artifacts
:
paths
:
-
target/release/nm-reactor
rust-nightly-test
:
stage
:
test
image
:
rustlang/rust:nightly
needs
:
-
rust-nightly
cache
:
key
:
"
$CI_COMMIT_REF_SLUG"
paths
:
-
cargo/
-
target/
policy
:
pull
<<
:
*rust_template
script
:
-
cargo test --verbose -j
1
rust-nightly-fmt
:
stage
:
format
image
:
rustlang/rust:nightly
needs
:
[]
cache
:
key
:
"
$CI_COMMIT_REF_SLUG"
paths
:
-
cargo/
-
target/
policy
:
pull
<<
:
*rust_template
script
:
-
cargo fmt --all --verbose -- --check
rust-nightly-clippy
:
stage
:
lint
image
:
rustlang/rust:nightly
needs
:
-
rust-nightly
cache
:
key
:
"
$CI_COMMIT_REF_SLUG"
paths
:
-
cargo/
-
target/
<<
:
*rust_template
script
:
-
cargo clippy --all --verbose -- -D warnings
upload
:
stage
:
release
rules
:
-
if
:
'
$CI_COMMIT_TAG
=~
/^\d+\.\d+\.\d+$/'
needs
:
-
job
:
rust-nightly
artifacts
:
true
image
:
curlimages/curl:latest
script
:
-
|
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file target/release/nm-reactor ${PACKAGE_REGISTRY_URL}/${LINUX_AMD64_BINARY}
release
:
stage
:
release
rules
:
-
if
:
'
$CI_COMMIT_TAG
=~
/^\d+\.\d+\.\d+$/'
needs
:
-
upload
image
:
registry.gitlab.com/gitlab-org/release-cli:latest
script
:
-
echo 'Running release_job'
release
:
name
:
'
v$CI_COMMIT_TAG'
description
:
'
Created
using
the
release-cli'
tag_name
:
'
$CI_COMMIT_TAG'
assets
:
links
:
-
name
:
'
Linux
(amd64)'
url
:
"
${PACKAGE_REGISTRY_URL}/${DARWIN_AMD64_BINARY}"
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment