Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/pip/tools/deps/pyinstaller-6.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
swetayadav1 authored May 28, 2024
2 parents 47b9851 + 6822ef7 commit efa573c
Show file tree
Hide file tree
Showing 14 changed files with 102 additions and 59 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/alpha_cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,21 @@ jobs:
with:
fetch-depth: "0"

- name: Install SSH key
- name: Install SSH key for Bastion
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIV_KEY }}
known_hosts: ${{ secrets.SSH_KNOWN_HOST_DEPLOY }}
key: ${{ secrets.DEV_TOOLS_BASTION_PRIVATE_KEY }}
name: id_rsa-bastion
known_hosts: ${{ secrets.KNOWN_HOSTS_OF_BASTION }}
config: ${{ secrets.CONFIG }}

- name: Install SSH key of target
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.DEV_TOOLS_EC2_PRIVATE_KEY }}
name: id_rsa-target
known_hosts: ${{ secrets.KNOWN_HOSTS_OF_TARGET }}
config: ${{ secrets.CONFIG }}

- name: Clean-up old versions
run: bash tools/cleanup.sh ${{ github.event.inputs.appVersion }}
16 changes: 13 additions & 3 deletions .github/workflows/beta_to_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,21 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install SSH key
- name: Install SSH key for Bastion
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIV_KEY }}
known_hosts: ${{ secrets.SSH_KNOWN_HOST_DEPLOY }}
key: ${{ secrets.DEV_TOOLS_BASTION_PRIVATE_KEY }}
name: id_rsa-bastion
known_hosts: ${{ secrets.KNOWN_HOSTS_OF_BASTION }}
config: ${{ secrets.CONFIG }}

- name: Install SSH key of target
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.DEV_TOOLS_EC2_PRIVATE_KEY }}
name: id_rsa-target
known_hosts: ${{ secrets.KNOWN_HOSTS_OF_TARGET }}
config: ${{ secrets.CONFIG }}

- name: Ready for promotion
run: bash tools/deploy.sh ${{ github.event.inputs.betaVersion }}
12 changes: 0 additions & 12 deletions .github/workflows/main.yml

This file was deleted.

28 changes: 19 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ jobs:
echo "${{ secrets.CERT_APP_MACOS }}" | base64 --decode > developerID_application.cer
echo "${{ secrets.PRIV_APP_MACOS }}" | base64 --decode > nuxeo-drive.priv
- name: "[macOS] Downloading Python"
if: matrix.os == 'macos-latest'
run: curl https://www.python.org/ftp/python/3.9.5/python-3.9.5-macosx10.9.pkg -o "python.pkg" # XXX_PYTHON
#- name: "[macOS] Downloading Python"
# if: matrix.os == 'macos-latest'
# run: curl https://www.python.org/ftp/python/3.9.5/python-3.9.5-macosx10.9.pkg -o "python.pkg" # XXX_PYTHON

- name: "[macOS] Install Python"
if: matrix.os == 'macos-latest'
run: sudo installer -pkg python.pkg -target /
#- name: "[macOS] Install Python"
# if: matrix.os == 'macos-latest'
# run: sudo installer -pkg python.pkg -target /

- name: "[macOS] Setup the environment"
if: matrix.os == 'macos-latest'
Expand Down Expand Up @@ -210,11 +210,21 @@ jobs:
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
id: extract_branch

- name: Install SSH key
- name: Install SSH key for Bastion
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIV_KEY }}
known_hosts: ${{ secrets.SSH_KNOWN_HOST_DEPLOY }}
key: ${{ secrets.DEV_TOOLS_BASTION_PRIVATE_KEY }}
name: id_rsa-bastion
known_hosts: ${{ secrets.KNOWN_HOSTS_OF_BASTION }}
config: ${{ secrets.CONFIG }}

- name: Install SSH key of target
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.DEV_TOOLS_EC2_PRIVATE_KEY }}
name: id_rsa-target
known_hosts: ${{ secrets.KNOWN_HOSTS_OF_TARGET }}
config: ${{ secrets.CONFIG }}
- name: Setup git
run: |
git config user.email ${{ env.GITHUB_EMAILID }}
Expand Down
7 changes: 7 additions & 0 deletions docs/changes/5.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Release date: `2024-xx-xx`
## Packaging / Build

- [NXDRIVE-2896](https://jira.nuxeo.com/browse/NXDRIVE-2896): Fix release build for upload/download artifact
- [NXDRIVE-2926] (https://jira.nuxeo.com/browse/NXDRIVE-2926): Update github Action Runner to use mac-latest
- [NXDRIVE-2932] (https://jira.nuxeo.com/browse/NXDRIVE-2932): Fix Microsoft Visual Studio issue

## Tests

Expand All @@ -36,6 +38,9 @@ Release date: `2024-xx-xx`

- Added `build` 1.1.1
- Added `pyproject-hooks` 1.0.0
- Added `PyQt5-Qt5` 5.15.13 (for MAC)
- Added `PyQt5-Qt5` 5.15.2 (for Windows and Linux)
- Added `setuptools` 69.5.1
- Added `tomli` 2.0.1
- Removed `toml` 0.10.2
- Upgraded `actions/cache` from 3 to 4
Expand Down Expand Up @@ -87,6 +92,8 @@ Release date: `2024-xx-xx`
- Upgraded `pyobjc-framework-fsevents` from 7.3 to 10.1
- Upgraded `pyobjc-framework-scriptingbridge` from 7.3 to 10.1
- Upgraded `pyobjc-framework-systemconfiguration` from 7.3 to 10.1
- Upgraded `pyqt5` from 5.15.2 to 5.15.10
- Upgraded `pyqt5-sip` from 12.8.1 to 12.13.0
- Upgraded `pytest` from 7.4.0 to 7.4.4
- Upgraded `pytest-timeout` from 2.0.2 to 2.2.0
- Upgraded `pytest-xdist` from 3.3.1 to 3.5.0
Expand Down
6 changes: 3 additions & 3 deletions tools/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ purge() {

echo " - ${version}"
python3 tools/versions.py --delete "${version}"
ssh -o StrictHostKeyChecking=no -T nuxeo@lethe.nuxeo.com "rm -vf ${REMOTE_PATH_PROD}/alpha/*${version}.* ${REMOTE_PATH_PROD}/alpha/*${version}-*" || true
ssh -o StrictHostKeyChecking=no -T lethe.nuxeo.com "rm -vf ${REMOTE_PATH_PROD}/alpha/*${version}.* ${REMOTE_PATH_PROD}/alpha/*${version}-*" || true
git tag --delete "alpha-${version}" || true
git push --delete origin "wip-alpha-${version}" || true # branch
git push --delete origin "alpha-${version}" || true # tag
Expand All @@ -32,7 +32,7 @@ main() {
python3 -m pip install --user pyyaml==5.3.1

echo ">>> Retrieving versions.yml"
rsync -e "ssh -o StrictHostKeyChecking=no" -vz nuxeo@lethe.nuxeo.com:"${REMOTE_PATH_PROD}/versions.yml" .
rsync -e "ssh -o StrictHostKeyChecking=no" -vz lethe.nuxeo.com:"${REMOTE_PATH_PROD}/versions.yml" .

echo ">>> Checking versions.yml integrity"
python3 tools/versions.py --check || exit 1
Expand Down Expand Up @@ -68,7 +68,7 @@ main() {
python3 tools/versions.py --check || exit 1

echo ">>> Uploading versions.yml"
rsync -e "ssh -o StrictHostKeyChecking=no" -vz versions.yml nuxeo@lethe.nuxeo.com:"${REMOTE_PATH_PROD}/"
rsync -e "ssh -o StrictHostKeyChecking=no" -vz versions.yml lethe.nuxeo.com:"${REMOTE_PATH_PROD}/"
}

main "$@"
6 changes: 3 additions & 3 deletions tools/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ release() {
fi

echo ">>> [${latest_release}] Deploying to the production website"
ssh -o "StrictHostKeyChecking=no" -T nuxeo@lethe.nuxeo.com <<EOF
ssh -o "StrictHostKeyChecking=no" -T lethe.nuxeo.com <<EOF
# Move beta files into the release folder
mv -vf ${REMOTE_PATH_PROD}/beta/*${drive_version}* ${REMOTE_PATH_PROD}/release/
Expand All @@ -45,9 +45,9 @@ EOF
echo ">>> [release ${drive_version}] Generating the versions file"
python3 -m pip install --user -U setuptools wheel
python3 -m pip install --user pyyaml==5.3.1
rsync -e "ssh -o StrictHostKeyChecking=no" -vz nuxeo@lethe.nuxeo.com:"${REMOTE_PATH_PROD}/versions.yml" .
rsync -e "ssh -o StrictHostKeyChecking=no" -vz lethe.nuxeo.com:"${REMOTE_PATH_PROD}/versions.yml" .
python3 tools/versions.py --promote "${drive_version}" --type "release"
rsync -e "ssh -o StrictHostKeyChecking=no" -vz versions.yml nuxeo@lethe.nuxeo.com:"${REMOTE_PATH_PROD}/"
rsync -e "ssh -o StrictHostKeyChecking=no" -vz versions.yml lethe.nuxeo.com:"${REMOTE_PATH_PROD}/"
}

release "$@"
2 changes: 2 additions & 0 deletions tools/deps/requirements-pip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ pyproject-hooks==1.0.0 \
# via
# build
# pip-tools
setuptools==69.5.1 \
--hash=sha256:c636ac361bc47580504644275c9ad802c50415c7522212252c033bd15f301f32
six==1.16.0 \
--hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 \
--hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926
Expand Down
19 changes: 13 additions & 6 deletions tools/deps/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,19 @@ pyqt5-sip==12.13.0 \
--hash=sha256:db228cd737f5cbfc66a3c3e50042140cb80b30b52edc5756dbbaa2346ec73137 \
--hash=sha256:ec60162e034c42fb99859206d62b83b74f987d58937b3a82bdc07b5c3d190dec \
--hash=sha256:fb4a5271fa3f6bc2feb303269a837a95a6d8dd16be553aa40e530de7fb81bfdf
pyqt5==5.15.2 \
--hash=sha256:894ca4ae767a8d6cf5903784b71f755073c78cb8c167eecf6e4ed6b3b055ac6a \
--hash=sha256:29889845688a54d62820585ad5b2e0200a36b304ff3d7a555e95599f110ba4ce \
--hash=sha256:ea24f24b7679bf393dd2e4f53fe0ce65021be18304c1ff7a226c2fc5c356d0da \
--hash=sha256:faaecb76ec65e12673a968e7f5bc02495957e6996f0a3fa0d98895f9e4113746 \
--hash=sha256:372b08dc9321d1201e4690182697c5e7ffb2e0770e6b4a45519025134b12e4fc
pyqt5==5.15.10 \
--hash=sha256:501355f327e9a2c38db0428e1a236d25ebcb99304cd6e668c05d1188d514adec \
--hash=sha256:862cea3be95b4b0a2b9678003b3a18edf7bd5eafd673860f58820f246d4bf616 \
--hash=sha256:93288d62ebd47b1933d80c27f5d43c7c435307b84d480af689cef2474e87e4c8 \
--hash=sha256:b89478d16d4118664ff58ed609e0a804d002703c9420118de7e4e70fa1cb5486 \
--hash=sha256:d46b7804b1b10a4ff91753f8113e5b5580d2b4462f3226288e2d84497334898a \
--hash=sha256:ff99b4f91aa8eb60510d5889faad07116d3340041916e46c07d519f7cad344e1
PyQt5-Qt5==5.15.13 ; sys_platform == "darwin" \
--hash=sha256:141859f2ffe04cc6c5db970e2b6ad9f98897805d886a14c52614e3799daab6d6
PyQt5-Qt5==5.15.2 ; sys_platform != "darwin" \
--hash=sha256:9cc7a768b1921f4b982ebc00a318ccb38578e44e45316c7a4a850e953e1dd327 \
--hash=sha256:750b78e4dba6bdf1607febedc08738e318ea09e9b10aea9ff0d73073f11f6962 \
--hash=sha256:1988f364ec8caf87a6ee5d5a3a5210d57539988bf8e84714c7d60972692e2f4a
pyqt5-stubs==5.15.6.0 \
--hash=sha256:7fb8177c72489a8911f021b7bd7c33f12c87f6dba92dcef3fdcdb5d9400f0f3f \
--hash=sha256:91270ac23ebf38a1dc04cd97aa852cd08af82dc839100e5395af1447e3e99707
Expand Down
23 changes: 16 additions & 7 deletions tools/posix/deploy_ci_agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ set -e
PYTHON="python3 -Xutf8 -E -s"
PYTHON_VENV="./venv/bin/python -Xutf8 -E -s"
PYTHON_OPT="${PYTHON_VENV} -OO"
PIP="${PYTHON_OPT} -m pip install --no-cache-dir --upgrade --upgrade-strategy=only-if-needed --progress-bar=off"
PIP="${PYTHON_OPT} -m pip install --no-cache-dir --upgrade --progress-bar=off"

build_installer() {
local version
Expand Down Expand Up @@ -217,12 +217,21 @@ install_python() {

# We need to override the default python used by pyenv as we installed it manually
# See ticket: https://jira.nuxeo.com/browse/NXDRIVE-2724
if [ "${MACOSX_DEPLOYMENT_TARGET:-unset}" != "unset" ]; then
ln -sf $(which python3) $(which python)
else
pyenv install --skip-existing "${version}"
pyenv global "${version}"
fi

#if [ "${MACOSX_DEPLOYMENT_TARGET:-unset}" != "unset" ]; then
# ln -sf $(which python3) $(which python)
#else
# pyenv install --skip-existing "${version}"
# pyenv global "${version}"
#fi

echo ">>> Actual Python Version: '$(python3 --version)'"
pyenv install --skip-existing "${version}"
pyenv global "${version}"
eval "$(pyenv init -)"
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"
echo "**** Python Version in use: '$(python3 --version)'"

echo ">>> [pyenv] Using Python ${version}"

Expand Down
6 changes: 3 additions & 3 deletions tools/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cancel() {
artifacts="${REMOTE_PATH_STAGING}/${GITHUB_RUN_NUMBER}"

echo ">>> [Deploy] Removing uploaded artifacts"
ssh -o "StrictHostKeyChecking=no" nuxeo@lethe.nuxeo.com rm -rfv "${artifacts}"
ssh -o "StrictHostKeyChecking=no" lethe.nuxeo.com rm -rfv "${artifacts}"
}

create() {
Expand Down Expand Up @@ -48,8 +48,8 @@ publish() {
fi

echo ">>> [${release_type} ${drive_version}] Deploying to the server"
scp -o "StrictHostKeyChecking=no" tools/versions.py nuxeo@lethe.nuxeo.com:"${artifacts}"
ssh -o "StrictHostKeyChecking=no" -T nuxeo@lethe.nuxeo.com <<EOF
scp -o "StrictHostKeyChecking=no" tools/versions.py lethe.nuxeo.com:"${artifacts}"
ssh -o "StrictHostKeyChecking=no" -T lethe.nuxeo.com <<EOF
cd ${artifacts} || exit 1
echo " >> [Deploy] Generating ${drive_version}.yml"
Expand Down
4 changes: 2 additions & 2 deletions tools/upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ publish_staging() {
path="${REMOTE_PATH_STAGING}/${GITHUB_RUN_NUMBER}/"

echo ">>> [Upload] Deploying to the staging server"
rsync -e "ssh -o StrictHostKeyChecking=no" --chmod=755 -pvz "${artifact}" nuxeo@lethe.nuxeo.com:"${path}" || \
rsync -e "ssh -o StrictHostKeyChecking=no" -vz "${artifact}" nuxeo@lethe.nuxeo.com:"${path}" || exit 1 # macOS does not have --chmod
rsync -e "ssh -o StrictHostKeyChecking=no" --chmod=755 -pvz "${artifact}" lethe.nuxeo.com:"${path}" || \
rsync -e "ssh -o StrictHostKeyChecking=no" -vz "${artifact}" lethe.nuxeo.com:"${path}" || exit 1 # macOS does not have --chmod
echo "Artifacts deployed to:"
echo " >>> ${REMOTE_PATH_STAGING}/${GITHUB_RUN_NUMBER} <<<"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,27 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,27 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down

0 comments on commit efa573c

Please sign in to comment.