From 2d5008285a75f8e98678fdda5ba6e3b658174ffa Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Fri, 1 Sep 2023 17:35:19 -0400 Subject: [PATCH 01/17] wip --- .github/workflows/build.yml | 116 ++++++++++++++++++++++++++---------- 1 file changed, 85 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b949658..6cf8dac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,39 +1,93 @@ name: Build on: - push: - branches: - - main + push: + branches: + - main + pull_request: # TODO (aliddell): remove this + branches: + - main jobs: - build: - strategy: - matrix: - platform: [windows-latest, macos-latest, ubuntu-latest] + linux: + runs-on: ubuntu-latest + strategy: + matrix: + target: [ x86_64, x86, aarch64, armv7, s390x, ppc64le ] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + args: --release --out dist + sccache: 'true' + manylinux: auto + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist - runs-on: ${{matrix.platform}} - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive + windows: + runs-on: windows-latest + strategy: + matrix: + target: [ x64, x86 ] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + architecture: ${{ matrix.target }} + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + args: --release --out dist + sccache: 'true' + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist - - name: Build (macOS) - if: matrix.platform == 'macos-latest' - uses: messense/maturin-action@v1 - with: - command: build - target: universal2-apple-darwin - args: --release -o dist + macos: + runs-on: macos-latest + strategy: + matrix: + target: [ x86_64, aarch64 ] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + args: --release --out dist + sccache: 'true' + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist - - name: Build - if: matrix.platform != 'macos-latest' - uses: messense/maturin-action@v1 - with: - command: build - args: --release -o dist - - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: ${{matrix.platform}} wheels - path: dist + sdist: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build sdist + uses: PyO3/maturin-action@v1 + with: + command: sdist + args: --out dist + - name: Upload sdist + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist From 664d5e0fd6a30a98ea0727c8c593e5d18da4d72c Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Fri, 1 Sep 2023 17:43:56 -0400 Subject: [PATCH 02/17] wip: recursive submodules --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6cf8dac..3b35770 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,8 @@ jobs: target: [ x86_64, x86, aarch64, armv7, s390x, ppc64le ] steps: - uses: actions/checkout@v3 + with: + submodules: recursive - uses: actions/setup-python@v4 with: python-version: '3.10' @@ -39,6 +41,8 @@ jobs: target: [ x64, x86 ] steps: - uses: actions/checkout@v3 + with: + submodules: recursive - uses: actions/setup-python@v4 with: python-version: '3.10' @@ -62,6 +66,8 @@ jobs: target: [ x86_64, aarch64 ] steps: - uses: actions/checkout@v3 + with: + submodules: recursive - uses: actions/setup-python@v4 with: python-version: '3.10' From 66e6c72fe89d0d543aea2354528c51ec383304bc Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Fri, 1 Sep 2023 18:02:05 -0400 Subject: [PATCH 03/17] add acquire-core-libs submodule --- .gitmodules | 5 ++++- acquire/CMakeLists.txt | 6 ++++++ acquire/acquire-core-libs | 1 + acquire-video-runtime => acquire/acquire-video-runtime | 0 acquire/cmake/aq_require.cmake | 5 +++++ build.rs | 6 +++++- 6 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 acquire/CMakeLists.txt create mode 160000 acquire/acquire-core-libs rename acquire-video-runtime => acquire/acquire-video-runtime (100%) create mode 100644 acquire/cmake/aq_require.cmake diff --git a/.gitmodules b/.gitmodules index dd334aa..3219a2e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,7 @@ [submodule "acquire-video-runtime"] - path = acquire-video-runtime + path = acquire/acquire-video-runtime url = ../acquire-video-runtime.git branch = main +[submodule "acquire-core-libs"] + path = acquire/acquire-core-libs + url = ../acquire-core-libs.git diff --git a/acquire/CMakeLists.txt b/acquire/CMakeLists.txt new file mode 100644 index 0000000..c2c06ee --- /dev/null +++ b/acquire/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.23) +cmake_project(acquire) + +include(cmake/aq_require.cmake) +aq_require(acquire-core-libs) +aq_require(acquire-video-runtime) diff --git a/acquire/acquire-core-libs b/acquire/acquire-core-libs new file mode 160000 index 0000000..edb33ca --- /dev/null +++ b/acquire/acquire-core-libs @@ -0,0 +1 @@ +Subproject commit edb33ca383c65c9d174fef0aa3769b34f11e4659 diff --git a/acquire-video-runtime b/acquire/acquire-video-runtime similarity index 100% rename from acquire-video-runtime rename to acquire/acquire-video-runtime diff --git a/acquire/cmake/aq_require.cmake b/acquire/cmake/aq_require.cmake new file mode 100644 index 0000000..9e05781 --- /dev/null +++ b/acquire/cmake/aq_require.cmake @@ -0,0 +1,5 @@ +function(aq_require tgt) + if(NOT TARGET ${tgt}) + add_subdirectory(${tgt}) + endif() +endfunction() diff --git a/build.rs b/build.rs index bfa9204..8479a5f 100644 --- a/build.rs +++ b/build.rs @@ -12,7 +12,11 @@ struct DriverManifest { } fn main() { - let dst = dbg!(cmake::Config::new("acquire-video-runtime") + let dst = dbg!(cmake::Config::new("acquire") + .target("acquire-core-logger") + .target("acquire-core-platform") + .target("acquire-device-hal") + .target("acquire-device-properties") .target("acquire-video-runtime") .profile("RelWithDebInfo") .static_crt(true) From 38861abaecf39558155aa9cfadea87a96652e57d Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Fri, 1 Sep 2023 18:07:11 -0400 Subject: [PATCH 04/17] install libssl-dev in the linux job --- .github/workflows/build.yml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b35770..e53f145 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,44 +9,43 @@ on: - main jobs: - linux: - runs-on: ubuntu-latest + windows: + runs-on: windows-latest strategy: matrix: - target: [ x86_64, x86, aarch64, armv7, s390x, ppc64le ] + target: [ x64, x86 ] steps: - uses: actions/checkout@v3 with: - submodules: recursive + submodules: true - uses: actions/setup-python@v4 with: python-version: '3.10' + architecture: ${{ matrix.target }} - name: Build wheels uses: PyO3/maturin-action@v1 with: target: ${{ matrix.target }} args: --release --out dist sccache: 'true' - manylinux: auto - name: Upload wheels uses: actions/upload-artifact@v3 with: name: wheels path: dist - windows: - runs-on: windows-latest + macos: + runs-on: macos-latest strategy: matrix: - target: [ x64, x86 ] + target: [ x86_64, aarch64 ] steps: - uses: actions/checkout@v3 with: - submodules: recursive + submodules: true - uses: actions/setup-python@v4 with: python-version: '3.10' - architecture: ${{ matrix.target }} - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -59,24 +58,27 @@ jobs: name: wheels path: dist - macos: - runs-on: macos-latest + linux: + runs-on: ubuntu-latest strategy: matrix: - target: [ x86_64, aarch64 ] + target: [ x86_64, x86, aarch64, armv7, s390x, ppc64le ] steps: - uses: actions/checkout@v3 with: - submodules: recursive + submodules: true - uses: actions/setup-python@v4 with: python-version: '3.10' + - name: Install libssl-dev + run: sudo apt-get install libssl-dev - name: Build wheels uses: PyO3/maturin-action@v1 with: target: ${{ matrix.target }} args: --release --out dist sccache: 'true' + manylinux: auto - name: Upload wheels uses: actions/upload-artifact@v3 with: From 8c6caf39aea3314e9ded8cad75ec53800fb27460 Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Fri, 1 Sep 2023 18:10:19 -0400 Subject: [PATCH 05/17] fix --- acquire/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acquire/CMakeLists.txt b/acquire/CMakeLists.txt index c2c06ee..7805348 100644 --- a/acquire/CMakeLists.txt +++ b/acquire/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.23) -cmake_project(acquire) +project(acquire) include(cmake/aq_require.cmake) aq_require(acquire-core-libs) From efb5cf80e7c0b9814f383e07a2c0cf8dd71ff8e7 Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Tue, 5 Sep 2023 09:47:12 -0400 Subject: [PATCH 06/17] Remove unsupported architectures. --- .github/workflows/build.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e53f145..b1dd1ef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,14 +13,14 @@ jobs: runs-on: windows-latest strategy: matrix: - target: [ x64, x86 ] + target: [ x64 ] steps: - uses: actions/checkout@v3 with: submodules: true - uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.8' architecture: ${{ matrix.target }} - name: Build wheels uses: PyO3/maturin-action@v1 @@ -45,7 +45,7 @@ jobs: submodules: true - uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.8' - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -62,16 +62,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - target: [ x86_64, x86, aarch64, armv7, s390x, ppc64le ] + target: [ x86_64, aarch64 ] steps: - uses: actions/checkout@v3 with: submodules: true - uses: actions/setup-python@v4 with: - python-version: '3.10' - - name: Install libssl-dev - run: sudo apt-get install libssl-dev + python-version: '3.8' - name: Build wheels uses: PyO3/maturin-action@v1 with: From b64431d933ada0d685d4781f0d3fce3798e902d5 Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Tue, 5 Sep 2023 09:57:11 -0400 Subject: [PATCH 07/17] Install build requirements(?) --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b1dd1ef..e77102e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,6 +67,9 @@ jobs: - uses: actions/checkout@v3 with: submodules: true + - run: | + sudo apt-get update + sudo apt-get install build-essential libssl-dev pkg-config - uses: actions/setup-python@v4 with: python-version: '3.8' From 1d00566d9dd03f47802b47177a5535001dc95b9b Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Tue, 5 Sep 2023 10:07:56 -0400 Subject: [PATCH 08/17] Remove extra arguments on linux builds. --- .github/workflows/build.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e77102e..23113a5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,9 +67,6 @@ jobs: - uses: actions/checkout@v3 with: submodules: true - - run: | - sudo apt-get update - sudo apt-get install build-essential libssl-dev pkg-config - uses: actions/setup-python@v4 with: python-version: '3.8' @@ -78,8 +75,6 @@ jobs: with: target: ${{ matrix.target }} args: --release --out dist - sccache: 'true' - manylinux: auto - name: Upload wheels uses: actions/upload-artifact@v3 with: From 0ce2d251eda7578fb8930ee8cc33e64ce584acaf Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Tue, 5 Sep 2023 10:30:25 -0400 Subject: [PATCH 09/17] Just remove everything on linux builds. --- .github/workflows/build.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 23113a5..528f6aa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,20 +60,13 @@ jobs: linux: runs-on: ubuntu-latest - strategy: - matrix: - target: [ x86_64, aarch64 ] steps: - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v4 - with: - python-version: '3.8' - name: Build wheels uses: PyO3/maturin-action@v1 with: - target: ${{ matrix.target }} args: --release --out dist - name: Upload wheels uses: actions/upload-artifact@v3 From e0d967a64af4baf9b53ea9a40f98121a858cf7d3 Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Tue, 5 Sep 2023 11:11:11 -0400 Subject: [PATCH 10/17] Cleanup --- .github/workflows/build.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 528f6aa..81a5f1e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,16 +4,10 @@ on: push: branches: - main - pull_request: # TODO (aliddell): remove this - branches: - - main jobs: windows: runs-on: windows-latest - strategy: - matrix: - target: [ x64 ] steps: - uses: actions/checkout@v3 with: @@ -25,7 +19,7 @@ jobs: - name: Build wheels uses: PyO3/maturin-action@v1 with: - target: ${{ matrix.target }} + target: x64 args: --release --out dist sccache: 'true' - name: Upload wheels From 112bba117cac091b41f78ea0d452e42578f2d5b0 Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Tue, 5 Sep 2023 12:23:01 -0400 Subject: [PATCH 11/17] Update release job. --- .github/workflows/build.yml | 23 +++- .github/workflows/release.yml | 232 ++++++++++++++++++++++++---------- 2 files changed, 183 insertions(+), 72 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 81a5f1e..8a9791f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,13 +8,19 @@ on: jobs: windows: runs-on: windows-latest + strategy: + matrix: + python: + - "3.8" + - "3.9" + - "3.10" steps: - uses: actions/checkout@v3 with: submodules: true - uses: actions/setup-python@v4 with: - python-version: '3.8' + python-version: ${{ matrix.python }} architecture: ${{ matrix.target }} - name: Build wheels uses: PyO3/maturin-action@v1 @@ -33,13 +39,17 @@ jobs: strategy: matrix: target: [ x86_64, aarch64 ] + python: + - "3.8" + - "3.9" + - "3.10" steps: - uses: actions/checkout@v3 with: submodules: true - uses: actions/setup-python@v4 with: - python-version: '3.8' + python-version: ${{ matrix.python }} - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -54,10 +64,19 @@ jobs: linux: runs-on: ubuntu-latest + strategy: + matrix: + python: + - "3.8" + - "3.9" + - "3.10" steps: - uses: actions/checkout@v3 with: submodules: true + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} - name: Build wheels uses: PyO3/maturin-action@v1 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ab2b5f7..6b30f12 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,42 +5,32 @@ on: tags: - "v*.*.*" - "nightly" + pull_request: # TODO (aliddell): remove + branches: + - main jobs: - build: - name: Build + windows: + name: Build and test on Windows strategy: matrix: - platform: - - windows-latest - - ubuntu-latest - - macos-latest python: - "3.8" - "3.9" - "3.10" - - runs-on: ${{ matrix.platform }} - - permissions: - actions: write - + runs-on: windows-latest steps: - name: Cancel Previous Runs uses: styfle/cancel-workflow-action@0.11.0 with: access_token: ${{ github.token }} - - uses: actions/checkout@v3 with: - ref: main - submodules: recursive - - - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v4 + submodules: true + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} - + architecture: ${{ matrix.target }} - name: Checkout runtime nightly if: ${{github.ref_name == 'nightly'}} run: | @@ -48,7 +38,6 @@ jobs: git checkout nightly git submodule update --recursive working-directory: ${{github.workspace}}/acquire-video-runtime - - name: Set config to pull nightly drivers if: ${{github.ref_name == 'nightly'}} run: | @@ -61,52 +50,155 @@ jobs: } EOF shell: bash - - - name: Build (macOS) - if: matrix.platform == 'macos-latest' - uses: messense/maturin-action@v1 - with: - command: build - target: universal2-apple-darwin - args: --release -o dist - - - name: Build (Windows, Linux) - if: matrix.platform != 'macos-latest' - uses: messense/maturin-action@v1 + - name: Build wheels + uses: PyO3/maturin-action@v1 with: - command: build - args: --release -o dist - + target: x64 + args: --release --out dist + sccache: 'true' - name: Install test dependencies run: | python -m pip install --upgrade pip python -m pip install pytest pytest-cov tifffile zarr dask ome-zarr - - - name: Install Acquire (Windows) - if: matrix.platform == 'windows-latest' + - name: Install Acquire run: | $whl = ls | Select -First 1 python -m pip install $whl shell: pwsh working-directory: "${{ github.workspace }}/dist" - - - name: Install Acquire (Linux, macOS) - if: matrix.platform != 'windows-latest' + - name: Test artifact + run: | + python -m pytest -k test_basic --color=yes --cov-report=xml --cov=acquire --maxfail=5 --log-cli-level=0 + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist + macos: + runs-on: macos-latest + strategy: + matrix: + target: [ x86_64, aarch64 ] + python: + - "3.8" + - "3.9" + - "3.10" + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.11.0 + with: + access_token: ${{ github.token }} + - uses: actions/checkout@v3 + with: + submodules: true + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + - name: Checkout runtime nightly + if: ${{github.ref_name == 'nightly'}} + run: | + git fetch --tags + git checkout nightly + git submodule update --recursive + working-directory: ${{github.workspace}}/acquire-video-runtime + - name: Set config to pull nightly drivers + if: ${{github.ref_name == 'nightly'}} + run: | + cat >drivers.json <drivers.json < Date: Tue, 5 Sep 2023 12:28:46 -0400 Subject: [PATCH 12/17] update acquire-video-runtime submodule --- acquire/acquire-video-runtime | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acquire/acquire-video-runtime b/acquire/acquire-video-runtime index 2c53063..773a6f5 160000 --- a/acquire/acquire-video-runtime +++ b/acquire/acquire-video-runtime @@ -1 +1 @@ -Subproject commit 2c530630efcaff38949e15c0837dfe290b7a22b3 +Subproject commit 773a6f5e863e4356c2d19666b5a12fde133dbaba From 51769997d9a4a9c4fbb3b2821769a87621c54ba5 Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Tue, 5 Sep 2023 13:14:59 -0400 Subject: [PATCH 13/17] With `submodules: true` --- .github/workflows/release.yml | 28 ++++++++++++++++++++-------- .github/workflows/test_pr.yml | 10 +++++----- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6b30f12..bdfa08e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,9 +5,6 @@ on: tags: - "v*.*.*" - "nightly" - pull_request: # TODO (aliddell): remove - branches: - - main jobs: windows: @@ -31,13 +28,18 @@ jobs: with: python-version: ${{ matrix.python }} architecture: ${{ matrix.target }} + - name: Checkout core-libs nightly + if: ${{github.ref_name == 'nightly'}} + run: | + git fetch --tags + git checkout nightly + working-directory: ${{github.workspace}}/acquire/acquire-core-libs - name: Checkout runtime nightly if: ${{github.ref_name == 'nightly'}} run: | git fetch --tags git checkout nightly - git submodule update --recursive - working-directory: ${{github.workspace}}/acquire-video-runtime + working-directory: ${{github.workspace}}/acquire/acquire-video-runtime - name: Set config to pull nightly drivers if: ${{github.ref_name == 'nightly'}} run: | @@ -94,13 +96,18 @@ jobs: - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} + - name: Checkout core-libs nightly + if: ${{github.ref_name == 'nightly'}} + run: | + git fetch --tags + git checkout nightly + working-directory: ${{github.workspace}}/acquire/acquire-core-libs - name: Checkout runtime nightly if: ${{github.ref_name == 'nightly'}} run: | git fetch --tags git checkout nightly - git submodule update --recursive - working-directory: ${{github.workspace}}/acquire-video-runtime + working-directory: ${{github.workspace}}/acquire/acquire-video-runtime - name: Set config to pull nightly drivers if: ${{github.ref_name == 'nightly'}} run: | @@ -155,12 +162,17 @@ jobs: - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} + - name: Checkout core-libs nightly + if: ${{github.ref_name == 'nightly'}} + run: | + git fetch --tags + git checkout nightly + working-directory: ${{github.workspace}}/acquire/acquire-core-libs - name: Checkout runtime nightly if: ${{github.ref_name == 'nightly'}} run: | git fetch --tags git checkout nightly - git submodule update --recursive working-directory: ${{github.workspace}}/acquire-video-runtime - name: Set config to pull nightly drivers if: ${{github.ref_name == 'nightly'}} diff --git a/.github/workflows/test_pr.yml b/.github/workflows/test_pr.yml index 8e88fa1..f5c9a6a 100644 --- a/.github/workflows/test_pr.yml +++ b/.github/workflows/test_pr.yml @@ -4,7 +4,7 @@ on: push: branches: - main - pull_request_target: + pull_request: # TODO (aliddell): change back branches: - main @@ -31,7 +31,7 @@ jobs: - uses: actions/checkout@v3 with: - submodules: recursive + submodules: true ref: ${{ github.event.pull_request.head.sha }} - name: Set up Python ${{ matrix.python }} @@ -72,7 +72,7 @@ jobs: - uses: actions/checkout@v3 with: - submodules: recursive + submodules: true ref: ${{ github.event.pull_request.head.sha }} - name: Get CMake 3.24 @@ -118,7 +118,7 @@ jobs: - uses: actions/checkout@v3 with: - submodules: recursive + submodules: true ref: ${{ github.event.pull_request.head.sha }} - name: Get CMake 3.24 @@ -148,7 +148,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - submodules: recursive + submodules: true ref: ${{ github.event.pull_request.head.sha }} - name: Set up Python 3.10 From 0fbe86872f89c9bd7d73f6eb4ce2cc6da4887903 Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Tue, 5 Sep 2023 14:05:59 -0400 Subject: [PATCH 14/17] Test release job one more time. --- .github/workflows/release.yml | 57 ++++++++++++++++++----------------- .github/workflows/test_pr.yml | 2 +- 2 files changed, 31 insertions(+), 28 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bdfa08e..b2e1177 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,9 @@ on: tags: - "v*.*.*" - "nightly" + pull_request: # TODO (aliddell): remove + branches: + - main jobs: windows: @@ -206,33 +209,33 @@ jobs: name: wheels path: dist - release: - needs: - - windows - - macos - - linux - name: "Release" - runs-on: "ubuntu-latest" - - environment: - name: pypi - url: https://pypi.org/p/acquire-imaging - - permissions: write-all - - steps: - - uses: actions/checkout@v3 - - - uses: actions/download-artifact@v3 - id: download - with: - path: ${{ github.workspace }}/artifacts - - - name: Collect wheels - run: | - mkdir -p dist - mv ${{steps.download.outputs.download-path}}/*/*.whl dist - +# release: +# needs: +# - windows +# - macos +# - linux +# name: "Release" +# runs-on: "ubuntu-latest" +# +# environment: +# name: pypi +# url: https://pypi.org/p/acquire-imaging +# +# permissions: write-all +# +# steps: +# - uses: actions/checkout@v3 +# +# - uses: actions/download-artifact@v3 +# id: download +# with: +# path: ${{ github.workspace }}/artifacts +# +# - name: Collect wheels +# run: | +# mkdir -p dist +# mv ${{steps.download.outputs.download-path}}/*/*.whl dist +# # - name: Tagged release # if: ${{ github.ref_name != 'nightly' }} # uses: marvinpinto/action-automatic-releases@latest diff --git a/.github/workflows/test_pr.yml b/.github/workflows/test_pr.yml index f5c9a6a..ba84c0a 100644 --- a/.github/workflows/test_pr.yml +++ b/.github/workflows/test_pr.yml @@ -4,7 +4,7 @@ on: push: branches: - main - pull_request: # TODO (aliddell): change back + pull_request_target: branches: - main From 9b7d4fc114d2c1b9ff44eef50908b0a565fafd19 Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Tue, 5 Sep 2023 14:16:07 -0400 Subject: [PATCH 15/17] Ready. --- .github/workflows/release.yml | 107 +++++++++++++++++----------------- 1 file changed, 52 insertions(+), 55 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b2e1177..8a2a488 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,9 +5,6 @@ on: tags: - "v*.*.*" - "nightly" - pull_request: # TODO (aliddell): remove - branches: - - main jobs: windows: @@ -209,55 +206,55 @@ jobs: name: wheels path: dist -# release: -# needs: -# - windows -# - macos -# - linux -# name: "Release" -# runs-on: "ubuntu-latest" -# -# environment: -# name: pypi -# url: https://pypi.org/p/acquire-imaging -# -# permissions: write-all -# -# steps: -# - uses: actions/checkout@v3 -# -# - uses: actions/download-artifact@v3 -# id: download -# with: -# path: ${{ github.workspace }}/artifacts -# -# - name: Collect wheels -# run: | -# mkdir -p dist -# mv ${{steps.download.outputs.download-path}}/*/*.whl dist -# -# - name: Tagged release -# if: ${{ github.ref_name != 'nightly' }} -# uses: marvinpinto/action-automatic-releases@latest -# with: -# repo_token: ${{ github.token }} -# prerelease: false -# files: | -# dist/*.whl -# -# - name: Nightly release -# if: ${{ github.ref_name == 'nightly' }} -# uses: marvinpinto/action-automatic-releases@latest -# with: -# repo_token: ${{ secrets.PAT }} -# automatic_release_tag: "nightly" -# prerelease: true -# title: "Nightly Release" -# files: | -# dist/*.whl -# -# - name: Publish wheels -# if: ${{ github.ref_name != 'nightly' }} -# uses: pypa/gh-action-pypi-publish@release/v1 -# with: -# skip-existing: true + release: + needs: + - windows + - macos + - linux + name: "Release" + runs-on: "ubuntu-latest" + + environment: + name: pypi + url: https://pypi.org/p/acquire-imaging + + permissions: write-all + + steps: + - uses: actions/checkout@v3 + + - uses: actions/download-artifact@v3 + id: download + with: + path: ${{ github.workspace }}/artifacts + + - name: Collect wheels + run: | + mkdir -p dist + mv ${{steps.download.outputs.download-path}}/*/*.whl dist + + - name: Tagged release + if: ${{ github.ref_name != 'nightly' }} + uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: ${{ github.token }} + prerelease: false + files: | + dist/*.whl + + - name: Nightly release + if: ${{ github.ref_name == 'nightly' }} + uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: ${{ secrets.PAT }} + automatic_release_tag: "nightly" + prerelease: true + title: "Nightly Release" + files: | + dist/*.whl + + - name: Publish wheels + if: ${{ github.ref_name != 'nightly' }} + uses: pypa/gh-action-pypi-publish@release/v1 + with: + skip-existing: true From c25203d85f8f3dc14158d8663de0d11c391dd971 Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Tue, 5 Sep 2023 14:21:41 -0400 Subject: [PATCH 16/17] Cleanup. --- .github/workflows/release.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8a2a488..182af6e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -76,7 +76,9 @@ jobs: with: name: wheels path: dist + macos: + name: Build and test on macOS runs-on: macos-latest strategy: matrix: @@ -143,7 +145,9 @@ jobs: with: name: wheels path: dist + linux: + name: Build and test on Ubuntu runs-on: ubuntu-latest strategy: matrix: @@ -211,8 +215,8 @@ jobs: - windows - macos - linux - name: "Release" - runs-on: "ubuntu-latest" + name: Release + runs-on: ubuntu-latest environment: name: pypi From f3b562379328e6e7740b5b70ca27cc3b625e936e Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Fri, 22 Sep 2023 12:39:59 -0400 Subject: [PATCH 17/17] remove old submodules --- acquire/CMakeLists.txt | 6 ------ acquire/acquire-core-libs | 1 - acquire/acquire-video-runtime | 1 - acquire/cmake/aq_require.cmake | 5 ----- 4 files changed, 13 deletions(-) delete mode 100644 acquire/CMakeLists.txt delete mode 160000 acquire/acquire-core-libs delete mode 160000 acquire/acquire-video-runtime delete mode 100644 acquire/cmake/aq_require.cmake diff --git a/acquire/CMakeLists.txt b/acquire/CMakeLists.txt deleted file mode 100644 index 7805348..0000000 --- a/acquire/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -cmake_minimum_required(VERSION 3.23) -project(acquire) - -include(cmake/aq_require.cmake) -aq_require(acquire-core-libs) -aq_require(acquire-video-runtime) diff --git a/acquire/acquire-core-libs b/acquire/acquire-core-libs deleted file mode 160000 index edb33ca..0000000 --- a/acquire/acquire-core-libs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit edb33ca383c65c9d174fef0aa3769b34f11e4659 diff --git a/acquire/acquire-video-runtime b/acquire/acquire-video-runtime deleted file mode 160000 index 773a6f5..0000000 --- a/acquire/acquire-video-runtime +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 773a6f5e863e4356c2d19666b5a12fde133dbaba diff --git a/acquire/cmake/aq_require.cmake b/acquire/cmake/aq_require.cmake deleted file mode 100644 index 9e05781..0000000 --- a/acquire/cmake/aq_require.cmake +++ /dev/null @@ -1,5 +0,0 @@ -function(aq_require tgt) - if(NOT TARGET ${tgt}) - add_subdirectory(${tgt}) - endif() -endfunction()