Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Windows CI #84

Merged
merged 8 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
name: Build

on:
push:
branches:
- main
push:
branches:
- main

jobs:
build:
strategy:
matrix:
platform: [windows-latest, macos-latest, ubuntu-latest]
build:
strategy:
matrix:
platform: [ windows-latest, macos-latest, ubuntu-latest ]

runs-on: ${{matrix.platform}}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
runs-on: ${{matrix.platform}}
steps:
- uses: actions/checkout@v3
with:
submodules: true

- 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 (macOS)
if: matrix.platform == 'macos-latest'
uses: messense/maturin-action@v1
with:
command: build
target: universal2-apple-darwin
args: --release -o dist

- name: Build
if: matrix.platform != 'macos-latest'
uses: messense/maturin-action@v1
with:
command: build
args: --release -o 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
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: ${{matrix.platform}} wheels
path: dist
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- uses: actions/checkout@v3
with:
ref: main
submodules: recursive
submodules: true

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
Expand All @@ -46,7 +46,7 @@ jobs:
run: |
git fetch --tags
git checkout nightly
git submodule update --recursive
git submodule update
working-directory: ${{github.workspace}}/acquire-video-runtime

- name: Set config to pull nightly drivers
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/test_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ "windows-latest", "ubuntu-latest", "macos-latest" ]
python: [ "3.8", "3.9", "3.10" ]
platform:
- windows-latest
- ubuntu-latest
- macos-latest
python:
- 3.8
- 3.9
- 3.10

permissions:
actions: write
Expand All @@ -31,7 +37,7 @@ jobs:

- uses: actions/checkout@v3
with:
submodules: recursive
submodules: true
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up Python ${{ matrix.python }}
Expand Down Expand Up @@ -72,7 +78,7 @@ jobs:

- uses: actions/checkout@v3
with:
submodules: recursive
submodules: true
ref: ${{ github.event.pull_request.head.sha }}

- name: Get CMake 3.24
Expand Down Expand Up @@ -118,7 +124,7 @@ jobs:

- uses: actions/checkout@v3
with:
submodules: recursive
submodules: true
ref: ${{ github.event.pull_request.head.sha }}

- name: Get CMake 3.24
Expand Down Expand Up @@ -148,7 +154,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
Expand Down
5 changes: 4 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[submodule "acquire-video-runtime"]
path = acquire-video-runtime
path = acquire-libs/acquire-video-runtime
url = ../acquire-video-runtime.git
branch = main
[submodule "acquire-libs/acquire-core-libs"]
path = acquire-libs/acquire-core-libs
url = ../acquire-core-libs.git
8 changes: 8 additions & 0 deletions acquire-libs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function(aq_require tgt)
if(NOT TARGET ${tgt})
add_subdirectory(${tgt})
endif()
endfunction()

aq_require(acquire-core-libs)
aq_require(acquire-video-runtime)
1 change: 1 addition & 0 deletions acquire-libs/acquire-core-libs
Submodule acquire-core-libs added at 40e71b
1 change: 1 addition & 0 deletions acquire-libs/acquire-video-runtime
Submodule acquire-video-runtime added at fa8eb7
1 change: 0 additions & 1 deletion acquire-video-runtime
Submodule acquire-video-runtime deleted from 2c5306
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ struct DriverManifest {
}

fn main() {
let dst = dbg!(cmake::Config::new("acquire-video-runtime")
let dst = cmake::Config::new("acquire-libs")
.target("acquire-video-runtime")
.profile("RelWithDebInfo")
.static_crt(true)
.define("NOTEST", "TRUE")
.define("NO_UNIT_TESTS", "TRUE")
.define("NO_EXAMPLES", "TRUE")
.define("CMAKE_OSX_DEPLOYMENT_TARGET", "10.15")
.build());
.build();

let drivers_json = fs::read_to_string("drivers.json")
.expect("Failed to read from drivers.json.");
Expand Down