Skip to content

Commit

Permalink
TMP (dont merge)
Browse files Browse the repository at this point in the history
  • Loading branch information
eskaur committed Nov 23, 2023
1 parent bbe817f commit 154bdfa
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 99 deletions.
91 changes: 1 addition & 90 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -90,46 +41,6 @@ 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
Expand Down Expand Up @@ -163,7 +74,7 @@ jobs:
run: python continuous-integration/notification/notify_teams.py --status ${{ job.status }}

deploy:
needs: [lint, test-linux-source-distribution, test-windows-binary-distribution]
needs: [test-windows-binary-distribution]
runs-on: ubuntu-latest
steps:
- name: Check out code
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.*
Expand Down
3 changes: 1 addition & 2 deletions continuous-integration/deployment/expected-artifacts.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
zivid-{version}-cp311-cp311-win_amd64.whl
2 changes: 1 addition & 1 deletion continuous-integration/deployment/expected-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.10.1.2.10.1
2.11.0.2.11.0
2 changes: 1 addition & 1 deletion continuous-integration/versions.json
Original file line number Diff line number Diff line change
@@ -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"
}
2 changes: 1 addition & 1 deletion continuous-integration/windows/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
2 changes: 1 addition & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 154bdfa

Please sign in to comment.