From f16c61cca8f080a47d4d5370c6e01020f113a6a8 Mon Sep 17 00:00:00 2001 From: Eskil Aursand Date: Thu, 23 Nov 2023 08:39:06 +0100 Subject: [PATCH] TMP (dont merge) --- .github/workflows/main.yml | 123 +----------------- README.md | 2 +- .../deployment/expected-artifacts.txt | 3 +- .../deployment/expected-version.txt | 2 +- continuous-integration/versions.json | 2 +- continuous-integration/windows/setup.py | 2 +- setup.py | 4 +- test/conftest.py | 2 +- 8 files changed, 9 insertions(+), 131 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9c2c6857..87b3b9d9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,55 +7,6 @@ on: - cron: '0 22 * * *' jobs: - lint: - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v3 - with: - lfs: false - - name: Build and lint - # Linting job should be run on the latest Ubuntu release that we can support - run: | - docker run \ - --volume $PWD:/host \ - --workdir /host/continuous-integration/linux \ - --env "PYTHONDONTWRITEBYTECODE=1" \ - ubuntu:23.04 \ - bash -c "./setup.sh && ./build.sh && ./lint.sh" - - name: Notify Teams - if: ${{ failure() && github.ref == 'refs/heads/master' }} - env: - CI_FAILURE_TEAMS_HOOK: ${{ secrets.CI_FAILURE_TEAMS_HOOK }} - run: python continuous-integration/notification/notify_teams.py --status ${{ job.status }} - - create-source-distribution: - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v3 - with: - lfs: false - - name: Create source distribution - run: | - docker run \ - --volume $PWD:/host \ - --workdir /host/continuous-integration/linux \ - --env "PYTHONDONTWRITEBYTECODE=1" \ - ubuntu:20.04 \ - bash -c "./setup.sh && ./create-source-distribution.sh" - - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: source-distribution - path: dist/zivid*.tar.gz - retention-days: 1 - - name: Notify Teams - if: ${{ failure() && github.ref == 'refs/heads/master' }} - env: - CI_FAILURE_TEAMS_HOOK: ${{ secrets.CI_FAILURE_TEAMS_HOOK }} - run: python continuous-integration/notification/notify_teams.py --status ${{ job.status }} - create-windows-binary-distribution: runs-on: windows-2019 strategy: @@ -90,80 +41,8 @@ jobs: CI_FAILURE_TEAMS_HOOK: ${{ secrets.CI_FAILURE_TEAMS_HOOK }} run: python continuous-integration/notification/notify_teams.py --status ${{ job.status }} - test-linux-source-distribution: - needs: create-source-distribution - runs-on: ubuntu-latest - # Build & test job should be run on: - # - All Ubuntu versions officially supported by Zivid SDK - # - All (not end-of-life) Ubuntu versions newer than the latest LTS - # - The three latest Fedora releases that we can support - strategy: - matrix: - os: - - ubuntu:20.04 - - ubuntu:22.04 - - ubuntu:23.04 - - fedora:35 - - fedora:36 - - fedora:37 - steps: - - name: Check out code - uses: actions/checkout@v3 - with: - lfs: true - - name: Download artifact - uses: actions/download-artifact@v3 - with: - name: source-distribution - path: dist - - name: Install from source-distribution and test - run: | - docker run \ - --volume $PWD:/host \ - --workdir /host/continuous-integration/linux \ - --env "PYTHONDONTWRITEBYTECODE=1" \ - ${{matrix.os}} \ - bash -c "./setup.sh && ./build-and-install-source-distribution.sh && ./test.sh" - - name: Notify Teams - if: ${{ failure() && github.ref == 'refs/heads/master' }} - env: - CI_FAILURE_TEAMS_HOOK: ${{ secrets.CI_FAILURE_TEAMS_HOOK }} - run: python continuous-integration/notification/notify_teams.py --status ${{ job.status }} - - test-windows-binary-distribution: - needs: create-windows-binary-distribution - runs-on: windows-2019 - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] - steps: - - name: Check out code - uses: actions/checkout@v3 - with: - lfs: true - - name: Download artifact - uses: actions/download-artifact@v3 - with: - name: bdist-win-python${{matrix.python-version}} - path: dist - - name: Set up Python ${{matrix.python-version}} - uses: actions/setup-python@v4 - with: - python-version: ${{matrix.python-version}} - - name: Setup - run: python continuous-integration\windows\setup.py - - name: Install from binary distribution - run: python continuous-integration\windows\install_binary_distribution.py - - name: Test - run: python continuous-integration\windows\test.py - - name: Notify Teams - if: ${{ failure() && github.ref == 'refs/heads/master' }} - env: - CI_FAILURE_TEAMS_HOOK: ${{ secrets.CI_FAILURE_TEAMS_HOOK }} - run: python continuous-integration/notification/notify_teams.py --status ${{ job.status }} - deploy: - needs: [lint, test-linux-source-distribution, test-windows-binary-distribution] + needs: [create-windows-binary-distribution] runs-on: ubuntu-latest steps: - name: Check out code diff --git a/README.md b/README.md index d989e415..b105714b 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Zivid Python is the official Python package for Zivid 3D cameras. Read more abou ### Dependencies * [Python](https://www.python.org/) version 3.7 or higher -* [Zivid SDK][zivid-download-software-url] version 2.10.1 (see [here][zivid-software-installation-url] for help) +* [Zivid SDK][zivid-download-software-url] version 2.11.0 (see [here][zivid-software-installation-url] for help) * [Compiler](doc/CompilerInstallation.md) with C++17 support *Ubuntu users must install Python headers (`apt install python3-dev`) in addition to the regular `python3` package.* diff --git a/continuous-integration/deployment/expected-artifacts.txt b/continuous-integration/deployment/expected-artifacts.txt index 99c5e53c..e4d3ffd6 100644 --- a/continuous-integration/deployment/expected-artifacts.txt +++ b/continuous-integration/deployment/expected-artifacts.txt @@ -2,5 +2,4 @@ zivid-{version}-cp37-cp37m-win_amd64.whl zivid-{version}-cp38-cp38-win_amd64.whl zivid-{version}-cp39-cp39-win_amd64.whl zivid-{version}-cp310-cp310-win_amd64.whl -zivid-{version}-cp311-cp311-win_amd64.whl -zivid-{version}.tar.gz \ No newline at end of file +zivid-{version}-cp311-cp311-win_amd64.whl \ No newline at end of file diff --git a/continuous-integration/deployment/expected-version.txt b/continuous-integration/deployment/expected-version.txt index 5777c832..a2d85a56 100644 --- a/continuous-integration/deployment/expected-version.txt +++ b/continuous-integration/deployment/expected-version.txt @@ -1 +1 @@ -2.10.1.2.10.1 +2.11.0.2.11.0 diff --git a/continuous-integration/versions.json b/continuous-integration/versions.json index 3ec47841..e013ae44 100644 --- a/continuous-integration/versions.json +++ b/continuous-integration/versions.json @@ -1,4 +1,4 @@ { - "ZIVID_SDK_EXACT_VERSION": "2.10.1+50b274e8-7", + "ZIVID_SDK_EXACT_VERSION": "2.11.0-rc-1+9df43446-1", "ZIVID_TELICAM_EXACT_VERSION": "3.0.1.1-3" } diff --git a/continuous-integration/windows/setup.py b/continuous-integration/windows/setup.py index 045afa82..c814feab 100644 --- a/continuous-integration/windows/setup.py +++ b/continuous-integration/windows/setup.py @@ -15,7 +15,7 @@ def _install_zivid_sdk(): exact_version = json.loads(versions_json)["ZIVID_SDK_EXACT_VERSION"] with tempfile.TemporaryDirectory() as temp_dir: - zivid_installer_url = f"https://downloads.zivid.com/sdk/releases/{exact_version}/windows/ZividSetup_{exact_version}.exe" + zivid_installer_url = f"https://downloads.zivid.com/sdk/previews/{exact_version}/windows/ZividSetup_{exact_version}.exe" print("Downloading {}".format(zivid_installer_url), flush=True) zivid_installer = Path(temp_dir) / "ZividSetup.exe" response = requests.get(zivid_installer_url, timeout=(25, 600)) diff --git a/setup.py b/setup.py index bd757d75..ae50c687 100644 --- a/setup.py +++ b/setup.py @@ -10,11 +10,11 @@ # To be replaced by: from setuptools_scm import get_version def get_version(): - return "2.10.1" + return "2.11.0" def _zivid_sdk_version(): - return "2.10.1" + return "2.11.0" def _zivid_python_version(): diff --git a/test/conftest.py b/test/conftest.py index 7e326d3a..be7c71b7 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -18,7 +18,7 @@ def datamodel_yml_dir_fixture(): return _testdata_dir() / "datamodels" -@pytest.fixture(name="application", scope="module") +@pytest.fixture(name="application", scope="session") def application_fixture(): with zivid.Application() as app: yield app