Skip to content

Commit

Permalink
Automate initialization and installation of dependencies
Browse files Browse the repository at this point in the history
Ref. eng/recordflux/RecordFlux#1531
  • Loading branch information
treiher committed Feb 26, 2024
1 parent 325a468 commit 19ece72
Show file tree
Hide file tree
Showing 6 changed files with 332 additions and 188 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*.egg-info
*.o
*.pyc
.bin
.coverage
.coverage.*
.env
Expand Down
10 changes: 4 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ variables:
SPARK_BUILD_DATE: "all"
PYTHON_VERSION: "3.11"
NODE_VERSION: "20.5.1"
POETRY_VERSION: "1.7.1"
POETRY_DYNAMIC_VERSIONING_VERSION: "1.2.0"

# If set to 1, the packaging of RecordFlux including the compilation of the langkit-based parser will be tested.
CLEAN_RECORDFLUX_SETUP: 0
Expand Down Expand Up @@ -59,8 +57,6 @@ workflow:

.setup_python_venv: &setup_python_venv
- export PATH=$HOME/.local/bin:$PATH
- pipx install poetry==$POETRY_VERSION
- pipx inject poetry poetry-dynamic-versioning==$POETRY_DYNAMIC_VERSIONING_VERSION
- python$PYTHON_VERSION -m venv --clear .venv$PYTHON_VERSION
- . .venv$PYTHON_VERSION/bin/activate
- if [ "$SCHEDULE" = "nightly" ]; then
Expand All @@ -77,6 +73,7 @@ setup:
artifacts:
paths:
- .venv$PYTHON_VERSION
- .venv.poetry
- alr
- generated
- rflx/lang
Expand All @@ -99,8 +96,6 @@ setup:
.setup_python: &setup_python
- export PATH=/it/e3/bin:$PATH
- export PATH=$HOME/.local/bin:$PATH
- pipx install poetry==$POETRY_VERSION
- pipx inject poetry poetry-dynamic-versioning==$POETRY_DYNAMIC_VERSIONING_VERSION
- if [ $CLEAN_RECORDFLUX_SETUP -eq 1 ]; then
python$PYTHON_VERSION -m venv --clear .venv;
. .venv/bin/activate;
Expand All @@ -110,9 +105,12 @@ setup:
make init install_devel;
fi
else
ln -s .venv$PYTHON_VERSION .venv;
. .venv$PYTHON_VERSION/bin/activate;
make init;
fi
# Prevent regeneration of Langkit-based parser
- touch generated/python/librflxlang generated/lib/relocatable/dev/librflxlang.so

changelog:
rules:
Expand Down
Loading

0 comments on commit 19ece72

Please sign in to comment.