Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix releaser.py import statement to be able to simply run it as python misc/releaser.py #6944

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions .github/workflows/_parse_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,12 @@ jobs:
id: version
shell: bash
run: >-
PYTHONPATH=. python3
misc/releaser.py version
"${{ inputs.version || '--uniq-dev' }}"
python misc/releaser.py version "${{ inputs.version || '--uniq-dev' }}"
| tee ${{ runner.temp }}/version.ini "$GITHUB_OUTPUT"
timeout-minutes: 2

- name: Set version for patching
run: >-
PYTHONPATH=. python3
misc/version_updater.py
--tool parsec
--version ${{ steps.version.outputs.full }}
run: python misc/version_updater.py --tool parsec --version ${{ steps.version.outputs.full }}
timeout-minutes: 2

- name: Generate git patch
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/_releaser_nightly_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ jobs:
timeout-minutes: 1

- name: Create nightly release
run: >-
PYTHONPATH=. python3
misc/releaser.py build --nightly --yes --no-gpg-sign
run: python misc/releaser.py build --nightly --yes --no-gpg-sign
timeout-minutes: 2

- name: Get commit for nightly tag
Expand All @@ -47,7 +45,5 @@ jobs:

- name: Parse version
id: version
run: >-
PYTHONPATH=. python3
misc/releaser.py version | tee -a $GITHUB_OUTPUT
run: python misc/releaser.py version | tee -a $GITHUB_OUTPUT
timeout-minutes: 1
8 changes: 2 additions & 6 deletions .github/workflows/ci-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,17 @@ jobs:
# with POETRY_LIBPARSEC_BUNDLE_EXTRA_SHARED_LIBRARIES=false (see below)
timeout-minutes: 2

- name: Fail if libparsec is not restored when style-only==true
if: inputs.style-only && steps.cache-libparsec.outputs.cache-hit != 'true'
run: exit 1

- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@b113a30d27a8e59c969077c0a0168cc13dab5ffc # pin v1.8.0
if: (!inputs.style-only) && steps.cache-libparsec.outputs.cache-hit != 'true'
if: steps.cache-libparsec.outputs.cache-hit != 'true'
with:
# We setup the cache by hand, see below
cache: false
timeout-minutes: 5

- name: Retrieve Rust cache
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # pin v2.7.3
if: (!inputs.style-only) && steps.cache-libparsec.outputs.cache-hit != 'true'
if: steps.cache-libparsec.outputs.cache-hit != 'true'
with:
# Cache is limited to 10Go (and cache is ~700mo per platform !). On top of that.
# cache is only shared between master and the PRs (and not across PRs).
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/docker-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ jobs:

- name: Get current version
id: version
run: >-
PYTHONPATH=. python3
misc/releaser.py version --uniq-dev
| tee -a $GITHUB_OUTPUT
run: python misc/releaser.py version --uniq-dev | tee -a $GITHUB_OUTPUT
timeout-minutes: 1

- name: Generate build metadata
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/docker-testbed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@ jobs:

- name: Get current version
id: version
run: >-
PYTHONPATH=. python3
misc/releaser.py version --uniq-dev
| tee -a $GITHUB_OUTPUT
run: python misc/releaser.py version --uniq-dev | tee -a $GITHUB_OUTPUT
timeout-minutes: 1

- name: Generate build metadata
Expand Down
2 changes: 1 addition & 1 deletion misc/releaser.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
from pathlib import Path
from typing import Any

import misc.version_updater as version_updater # type: ignore (pyright struggles with this when run from server folder)
import version_updater # type: ignore (pyright struggles with this when run from server folder)

PYTHON_EXECUTABLE_PATH = sys.executable
LICENSE_CONVERSION_DELAY = 4 * 365 * 24 * 3600 # 4 years
Expand Down
2 changes: 1 addition & 1 deletion server/packaging/server/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SCRIPTDIR=${SCRIPTDIR:=$(dirname "$(realpath -s "$0")")}
# Allow the user to overwrite `ROOTDIR` by exporting it beforehand.
ROOTDIR=${ROOTDIR:=$(realpath -s "$SCRIPTDIR/../../..")}

UNIQ_TAG=$(PYTHONPATH=$ROOTDIR python $ROOTDIR/misc/releaser.py version --uniq-dev | sed -n 's/docker=\(.*\)$/\1/p')
UNIQ_TAG=$(python $ROOTDIR/misc/releaser.py version --uniq-dev | sed -n 's/docker=\(.*\)$/\1/p')
# We use Github package repository to store our docker's container.
PREFIX=ghcr.io/scille/parsec-cloud
IMAGE_NAME=parsec-server
Expand Down
2 changes: 1 addition & 1 deletion server/packaging/testbed-server/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SCRIPTDIR=${SCRIPTDIR:=$(dirname "$(realpath -s "$0")")}
# Allow the user to overwrite `ROOTDIR` by exporting it beforehand.
ROOTDIR=${ROOTDIR:=$(realpath -s "$SCRIPTDIR/../../..")}

UNIQ_TAG=$(PYTHONPATH=$ROOTDIR python $ROOTDIR/misc/releaser.py version --uniq-dev | sed -n 's/docker=\(.*\)$/\1/p')
UNIQ_TAG=$(python $ROOTDIR/misc/releaser.py version --uniq-dev | sed -n 's/docker=\(.*\)$/\1/p')
# We use Github package repository to store our docker's container.
PREFIX=ghcr.io/scille/parsec-cloud

Expand Down