Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gvec_to_python
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
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
gvec-group
gvec_to_python
Commits
324ab029
Commit
324ab029
authored
2 years ago
by
Stefan Possanner
Browse files
Options
Downloads
Patches
Plain Diff
use before_script in ci
parent
2e8054c3
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!16
Add stages to ci
Pipeline
#172164
passed
2 years ago
Stage: startup
Stage: build
Stage: install_and_test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+13
-12
13 additions, 12 deletions
.gitlab-ci.yml
with
13 additions
and
12 deletions
.gitlab-ci.yml
+
13
−
12
View file @
324ab029
...
@@ -8,9 +8,21 @@ default:
...
@@ -8,9 +8,21 @@ default:
# Try to use only one job per stage.
# Try to use only one job per stage.
# Stupid GitLab fails to load the cache for second jobs.
# Stupid GitLab fails to load the cache for second jobs.
cache
:
# Global `cache`.
cache
:
# Global `cache`.
key
:
'
python-env'
paths
:
paths
:
-
g2p-env-$CI_PIPELINE_ID/
-
g2p-env-$CI_PIPELINE_ID/
before_script
:
-
apt-get -qq update && apt-get -qq install -y gcc gfortran libblas-dev liblapack-dev
-
source g2p-env-$CI_PIPELINE_ID/bin/activate
-
pip list
-
ENV_PATH=$(python3 -c "import sysconfig; print(sysconfig.get_path('platlib'))")
#- ENV_PATH=$(python3 -m site --user-site)
-
LIBDIR=$(python3 -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))")
-
echo $ENV_PATH
-
echo $LIBDIR
-
ls
artifacts
:
artifacts
:
reports
:
reports
:
coverage_report
:
coverage_report
:
...
@@ -18,7 +30,7 @@ default:
...
@@ -18,7 +30,7 @@ default:
path
:
coverage.xml
path
:
coverage.xml
paths
:
paths
:
-
logs/execution.log
-
logs/execution.log
-
dist/
*
-
dist/
after_script
:
# Global `after_script`.
after_script
:
# Global `after_script`.
-
ls g2p-env-$CI_PIPELINE_ID
-
ls g2p-env-$CI_PIPELINE_ID
...
@@ -47,7 +59,6 @@ default_venv:
...
@@ -47,7 +59,6 @@ default_venv:
-
uname -o
-
uname -o
-
echo "Hello ${GITLAB_USER_NAME} !"
-
echo "Hello ${GITLAB_USER_NAME} !"
-
echo "This is job ${CI_JOB_ID}"
-
echo "This is job ${CI_JOB_ID}"
-
apt-get -qq update && apt-get -qq install -y gcc gfortran libblas-dev liblapack-dev
script
:
script
:
-
echo "Creating virtual environment..."
-
echo "Creating virtual environment..."
-
pip install -U virtualenv
-
pip install -U virtualenv
...
@@ -68,11 +79,7 @@ default_build:
...
@@ -68,11 +79,7 @@ default_build:
-
if
:
$CI_PIPELINE_SOURCE == "push"
-
if
:
$CI_PIPELINE_SOURCE == "push"
needs
:
[
'
default_venv'
]
needs
:
[
'
default_venv'
]
script
:
script
:
-
pip list
-
python3 -m build
# build gvec_to_python (.whl)
-
python3 -m build
# build gvec_to_python (.whl)
artifacts
:
paths
:
-
dist/
install_and_test
:
install_and_test
:
stage
:
install_and_test
stage
:
install_and_test
...
@@ -81,12 +88,6 @@ install_and_test:
...
@@ -81,12 +88,6 @@ install_and_test:
when
:
never
when
:
never
-
if
:
$CI_COMMIT_REF_PROTECTED == "false" && $CI_PIPELINE_SOURCE == "push"
-
if
:
$CI_COMMIT_REF_PROTECTED == "false" && $CI_PIPELINE_SOURCE == "push"
needs
:
[
'
default_build'
]
needs
:
[
'
default_build'
]
before_script
:
# Overrides global `before_script`.
-
echo "Hello, $GITLAB_USER_LOGIN!"
-
python -V
# Print out python version for debugging.
-
pwd
-
apt-get -qq update && apt-get -qq install -y gcc gfortran libblas-dev liblapack-dev
-
source g2p-env-$CI_PIPELINE_ID/bin/activate
script
:
script
:
# install package
# install package
-
ls -lah dist
-
ls -lah dist
...
...
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