Skip to content

Commit

Permalink
updated UV test
Browse files Browse the repository at this point in the history
  • Loading branch information
rozyczko committed Sep 16, 2024
1 parent 3ba009c commit 39dc6bb
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 38 deletions.
25 changes: 16 additions & 9 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,20 @@ Fixes # (issue/issues)

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

## Review Checklist (please remove items if they don't apply):

- [ ] Code has been reviewed
- [ ] Functionality has been tested
- [ ] Windows installer (GH artifact) has been tested (installed and worked)
- [ ] MacOSX installer (GH artifact) has been tested (installed and worked)
- [ ] User documentation is available and complete (if required)
- [ ] Developers documentation is available and complete (if required)
- [ ] The introduced changes comply with SasView license (BSD 3-Clause)
## Review Checklist:

[if using the editor, use `[x]` in place of `[ ]` to check a box]

**Documentation** (check at least one)
- [ ] There is **nothing** that needs documenting
- [ ] Documentation changes are **in this PR**
- [ ] There is an **issue** open for the documentation (link?)

**Installers**
- [ ] There is a chance this will affect the **installers**, if so
- [ ] **Windows** installer (GH artifact) has been tested (installed and worked)
- [ ] **MacOSX** installer (GH artifact) has been tested (installed and worked)

**Licencing** (untick if necessary)
- [x] The introduced changes comply with SasView license (BSD 3-Clause)

40 changes: 19 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,43 +77,39 @@ jobs:
- name: Install X11 libraries (Linux)
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt-get update
sudo apt install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils xvfb libegl-dev
- name: Set the VIRTUAL_ENV variable for uv to work
run: |
echo "VIRTUAL_ENV=${Python_ROOT_DIR}" >> $GITHUB_ENV
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install uv
uv pip install --system --upgrade pip
uv pip install --system wheel setuptools
uv pip install --system -r build_tools/requirements.txt
uv pip install --system requests
python -m uv pip install wheel setuptools
python -m uv pip install -r build_tools/requirements.txt
- name: Install pywin32 (Windows)
if: ${{ startsWith(matrix.os, 'windows') }}
run: |
uv pip install --system pywin32
python -m uv pip install pywin32
- name: Install pyopencl (Windows)
if: ${{ startsWith(matrix.os, 'windows') }}
run: |
uv pip install --system pytools mako cffi
python -m uv pip install pytools mako cffi
choco install opencl-intel-cpu-runtime
choco install innosetup
python -m pip install --only-binary=pyopencl --find-links http://www.silx.org/pub/wheelhouse/ --trusted-host www.silx.org pyopencl
python -m uv pip install --only-binary True pyopencl
- name: Install pyopencl (Linux + macOS)
if: ${{ !startsWith(matrix.os, 'windows') }}
run: |
uv pip install --system pyopencl
python -m uv pip install pyopencl
- name: Fetch sources for sibling projects
run: |
git clone --depth=50 --branch=release_0.9.0 https://github.com/SasView/sasdata.git ../sasdata
git clone --depth=50 --branch=release_1.0.8 https://github.com/SasView/sasmodels.git ../sasmodels
git clone --depth=50 --branch=v0.9.2 https://github.com/bumps/bumps.git ../bumps
git clone --depth=50 --branch=master https://github.com/SasView/sasdata.git ../sasdata
git clone --depth=50 --branch=master https://github.com/SasView/sasmodels.git ../sasmodels
git clone --depth=1 --branch v0.9.3 https://github.com/bumps/bumps.git ../bumps
- name: Build and install sasdata
run: |
Expand All @@ -123,7 +119,7 @@ jobs:
python setup.py clean
python setup.py build
mv build/lib/sasdata/example_data/* ../sasview/src/sas/example_data/
uv pip install --system --no-deps .
python -m uv pip install --no-deps .
- name: Build and install sasmodels
run: |
Expand All @@ -132,7 +128,7 @@ jobs:
rm -rf dist
python setup.py clean
python setup.py build
uv pip install --system --no-deps .
python -m uv pip install --no-deps .
- name: Build and install bumps
run: |
Expand All @@ -141,13 +137,13 @@ jobs:
rm -rf dist
python setup.py clean
python setup.py build
uv pip install --system --no-deps .
python -m uv pip install --no-deps .
### Document the build environment

- name: Python package version list
run: |
uv pip freeze
python -m uv pip freeze
### Actual building of sasview

Expand All @@ -159,7 +155,7 @@ jobs:
# BUILD SASVIEW
python setup.py clean
python setup.py build
uv pip install --system --no-deps .
python -m uv pip install --system --no-deps .
### Run tests (if enabled)

Expand Down Expand Up @@ -201,8 +197,9 @@ jobs:
### Build the installer (if enabled)

- name: Install utilities to build installer
if: ${{ matrix.installer }}
run: |
uv pip install --system pyinstaller
python -m uv pip install pyinstaller
- name: Build sasview with pyinstaller
if: ${{ matrix.installer }}
Expand Down Expand Up @@ -458,6 +455,7 @@ jobs:
- name: Install X11 libraries (Linux)
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt-get update
sudo apt install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils xvfb
- name: Try running the installation (Linux)
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
os: [ macos-latest]
python-version: [ 3.8 ]
python-version: [ 3.11 ]
needs: reuse_main_ci

steps:
Expand Down Expand Up @@ -62,20 +62,20 @@ jobs:
- name: Rename artifacts
run: |
mv installers/dist/SasView-Installer-windows-*/setupSasView.exe installers/dist/setupSasView-nightly-Win64.exe
mv installers/dist/SasView-Installer-macos-*/SasView5.dmg installers/dist/SasView-nightly-MacOSX.dmg
mv installers/dist/SasView-Installer-ubuntu-*/sasview5.tar.gz installers/dist/SasView-nightly-Linux.tar.gz
mv installers/dist/SasView-Installer-macos-*/SasView6.dmg installers/dist/SasView-nightly-MacOSX.dmg
mv installers/dist/SasView-Installer-ubuntu-*/sasview6.tar.gz installers/dist/SasView-nightly-Linux.tar.gz
- name: Notarize Release Build (OSX)
uses: GuillaumeFalourd/xcode-notarize@v1
uses: lando/notarize-action@v2
with:
product-path: "installers/dist/SasView-nightly-MacOSX.dmg"
primary-bundle-id: "org.sasview.SasView5"
primary-bundle-id: "org.sasview.SasView6"
appstore-connect-username: ${{ secrets.NOTARIZATION_USERNAME }}
appstore-connect-password: ${{ secrets.NOTARIZATION_PASSWORD }}
appstore-connect-team-id: W2AG9MPZ43
verbose: True

- name: Staple Release Build (OSX)
if: ${{ startsWith(matrix.os, 'macos') }}
uses: BoundfoxStudios/action-xcode-staple@v1
with:
product-path: "installers/dist/SasView-nightly-MacOSX.dmg"
Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx-docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
# The short X.Y version.
version = '6.0'
# The full version, including e.g. alpha tags (a1).
release = '6.0.0b1'
release = '6.0.0b2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion installers/installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ UsedUserAreasWarning=no
LicenseFile=license.txt
ArchitecturesInstallIn64BitMode=x64
OutputBaseFilename=setupSasView
SetupIconFile=dist\sasview\_internal\images\ball.ico
SetupIconFile=dist\sasview\images\ball.ico


; Uncomment the following line to run in non administrative install mode (install for current user only.)
Expand Down
2 changes: 2 additions & 0 deletions installers/sasview.spec
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ if platform.system() == 'Darwin':
a.scripts,
exclude_binaries=True,
name='sasview',
contents_directory='.',
debug=False,
upx=True,
icon=os.path.join("../src/sas/qtgui/images","ball.icns"),
Expand All @@ -117,6 +118,7 @@ else:
[],
exclude_binaries=True,
name='sasview',
contents_directory='.',
debug=False,
bootloader_ignore_signals=False,
icon=os.path.join("../src/sas/qtgui/images","ball.ico"),
Expand Down

0 comments on commit 39dc6bb

Please sign in to comment.