-
Notifications
You must be signed in to change notification settings - Fork 44
Feat/dev 4221 matrix update #301
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
Merged
Merged
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
c43c66f
DEV-3737 testing matrix builds
a4dc9f3
DEV-3737 more testing of matrix stuff
09bf43d
DEV-3737 Matrix building is fun (for real)
6aed7a2
DEV-3737 fix typos
d3cae07
DEV-3737 Get uv setup before tests
74214f0
DEV-3737 Deal with pip to uv changes
2dc9fcd
DEV-3737 Deal with pip to uv changes in a different way
f5939af
DEV-3737 Use better variable
c35676b
DEV-3737 Add missing slash
284c234
DEV-3737 More uv work
6aacf13
DEV-3737 Another stab at uv
e844d51
DEV-3737 Pip and uv
0335997
DEV-3737 More testing
abb88a3
DEV-3737 Get things there when needed
ab6aa2b
DEV-3737 Help setuptools find license
4ce7a3d
DEV-3737 More uv testing
eb72e7f
DEV-3737 More uv work
3c39698
DEV-3737 Mac connection work
b312f1e
DEV-3737 Add more no_proxy
edad78b
DEV-3737 Work with macos networking changes
4331cbf
DEV-3737 more value tempering
0fb80f4
DEV-3737 Write a better waiting loop
02fedb5
DEV-3737 Fix typo and move more to uv
347511b
DEV-3737 More uv migration
de5b35e
DEV-3737 Small change with newer python versions
9bfd2d5
DEV-3737 Remove possible unneeded changes
f41166c
DEV-3737 Remove possible unneeded change correctly
a33a562
DEV-3737 Test another change
416644a
DEV-3737 Restore changes that were needed
ceadbab
DEV-3737 Remove testing line
97c5375
DEV-3737 Use a more robust set of OS options
ba2c0c2
DEV-3737 Remove final ambiguous OS
af0257a
Merge branch 'feaet/DEV-3737_Update_python_and_standardize' into feat…
73cdce0
DEV-3737 Move project information back to project
8a60af2
DEV-3737 Isolate issues
1d2b826
DEV-3737 Try to work with newer setuptools
b798bc3
DEV-3737 Reduce unneeded libraries
0e89471
DEV-3737 Remove unneeded packages
d326913
DEV-3737 Add packages as needed
ecb0e94
DEV-3737 Improve library usage
0dec662
DEV-3737 Remove testing line
af68af5
DEV-3737 Remove unneeded step
29fda5a
DEV-3737 Clean up command
0265035
DEV-3737 Add simple network test
735551b
DEV-3737 Use correct indentation
b8f4b89
DEV-3737 Remove helpful but unneeded test
16d595c
DEV-3737 Test moving to gitlab
cd03bdc
DEV-3737 Reduce load on github while testing
4396843
DEV-3737 Update code to match very helpful meeting
ff054cc
DEV-4221 Update test step
15d0cb1
DEV-4221 Update to check for new branch name for github runners
9583b82
DEV-4221 Move variable where it is needed for all steps
d837638
DEV-4221 Add comment to summarize script
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,13 +1,11 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -euox pipefail | ||
|
|
||
| function cleanup() { | ||
| # get rid of the virtualenv | ||
| echo "Cleaning up" | ||
| deactivate | ||
| rm -rf "${VENV_NAME:?}/" build/ dist/ include/ local/ share/ gdc-client.spec | ||
| } | ||
| # GitHub Actions uses this script to make bundles based on OS and Python | ||
| # versions. It identifies the OS, uses uv to grab libraries (ignoring dev tools | ||
| # and editable symlinks), and then uses PyInstaller to compile the Python CLI | ||
| # file. | ||
|
|
||
|
|
||
| function compress() { | ||
| # this way it's cross platform | ||
|
|
@@ -24,76 +22,35 @@ with ZipFile('${zip_name}', 'w') as z: | |
|
|
||
| while getopts ":d" opt; do | ||
| case $opt in | ||
| d) | ||
| DATE=$(date "+%m_%d_%Y") | ||
| ;; | ||
| \?) | ||
| echo "Invalid option: -$OPTARG" >&2 | ||
| ;; | ||
| esac | ||
| d) DATE=$(date "+%m_%d_%Y") ;; | ||
| \?) echo "Invalid option: -$OPTARG" >&2 ;; | ||
| esac | ||
| done | ||
|
|
||
| DATE=${DATE-} # if date is not passed in, default DATE variable to empty string | ||
| VENV_NAME="venv" | ||
| BINARY_NAME="gdc-client" | ||
| VENV_PATH="$VENV_NAME/bin/activate" | ||
|
|
||
| case $(uname -s) in | ||
| *NT*) | ||
| # for use in git bash with all the nice unix utilities | ||
| TARGET_ENVIRONMENT="Windows" | ||
| BINARY_NAME="gdc-client.exe" | ||
|
|
||
| # this works in git bash | ||
| alias python="winpty python" | ||
|
|
||
| # why does windows have to be so different? | ||
| VENV_PATH="$VENV_NAME/Scripts/activate" | ||
|
|
||
| # Presumably Python3 is the only `python` in the Windows %PATH% variable | ||
| python -m virtualenv "$VENV_NAME" | ||
| source "$VENV_PATH" | ||
| pip install pywin32 | ||
| ;; | ||
| *Linux*) | ||
| TARGET_ENVIRONMENT="Ubuntu" | ||
| python -m virtualenv "$VENV_NAME" --python=python3 | ||
| source "$VENV_PATH" | ||
| ;; | ||
| *Darwin*) | ||
| TARGET_ENVIRONMENT="OSX" | ||
| python -m virtualenv "$VENV_NAME" --python=python3 | ||
| source "$VENV_PATH" | ||
| ;; | ||
|
|
||
| case "$(uname -s)" in | ||
| *NT*) TARGET_ENVIRONMENT="Windows"; BINARY_NAME="gdc-client.exe" ;; | ||
| *Linux*) TARGET_ENVIRONMENT="Ubuntu" ;; | ||
| *Darwin*) TARGET_ENVIRONMENT="OSX" ;; | ||
| *) echo "Unsupported OS"; exit 1 ;; | ||
| esac | ||
|
|
||
| # setup.py is in previous dir | ||
| cd .. | ||
|
|
||
| python -m pip install --upgrade pip | ||
| python -m pip install --no-deps -r requirements.txt | ||
| python -m pip install --no-deps . | ||
| uv sync --locked --no-dev --no-editable | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This |
||
|
|
||
| # go back go the ./gdc_client/bin dir | ||
| cd bin | ||
|
|
||
| echo "Building for ${TARGET_ENVIRONMENT}..." | ||
|
|
||
| # Make sure the correct version of pyinstaller and setuptools are installed | ||
| pip install -U PyInstaller | ||
|
|
||
| # Ran into ModuleNotFoundError: No module named 'pkg_resources.py2_warn' with higher versions of setuptools | ||
| pip install --upgrade setuptools | ||
|
|
||
| # Get version | ||
| VERSION=$(python -c " | ||
| VERSION=$(uv run python -c " | ||
| import gdc_client.version | ||
| print(gdc_client.version.__version__)") | ||
|
|
||
| echo "Creating ${TARGET_ENVIRONMENT} package for version ${VERSION}..." | ||
|
|
||
| # Create binary | ||
| pyinstaller \ | ||
| uv run --with pyinstaller pyinstaller \ | ||
| --clean \ | ||
| --additional-hooks-dir=. \ | ||
| --noconfirm \ | ||
|
|
@@ -118,7 +75,3 @@ ZIP_NAME="$PRE_ZIP_NAME.zip" | |
| echo "The output zip file will be called ${ZIP_NAME}" | ||
| compress "$ZIP_NAME" "$BINARY_NAME" | ||
| mv "$ZIP_NAME" .. | ||
| cd .. | ||
|
|
||
| cleanup | ||
| export GDC_CLIENT_ZIP="$PRE_ZIP_NAME" | ||
This file contains hidden or 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
This file contains hidden or 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,3 +1,3 @@ | ||
| from importlib_metadata import version | ||
| from importlib.metadata import version | ||
|
|
||
| __version__ = version("gdc_client") |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be removed before merged