diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index a20f315..fcb0974 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -12,6 +12,14 @@ jobs: CONFIG: linux_64_ UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + linux_aarch64_: + CONFIG: linux_aarch64_ + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + linux_ppc64le_: + CONFIG: linux_ppc64le_ + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 timeoutInMinutes: 360 steps: diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index ee41919..a7aaaf2 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -11,6 +11,9 @@ jobs: osx_64_: CONFIG: osx_64_ UPLOAD_PACKAGES: 'True' + osx_arm64_: + CONFIG: osx_arm64_ + UPLOAD_PACKAGES: 'True' timeoutInMinutes: 360 steps: diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml new file mode 100644 index 0000000..5fba171 --- /dev/null +++ b/.ci_support/linux_aarch64_.yaml @@ -0,0 +1,27 @@ +BUILD: +- aarch64-conda_cos7-linux-gnu +c_compiler: +- gcc +c_compiler_version: +- '12' +cdt_arch: +- aarch64 +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cxx_compiler: +- gxx +cxx_compiler_version: +- '12' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +rust_compiler: +- rust +target_platform: +- linux-aarch64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml new file mode 100644 index 0000000..83d9923 --- /dev/null +++ b/.ci_support/linux_ppc64le_.yaml @@ -0,0 +1,23 @@ +c_compiler: +- gcc +c_compiler_version: +- '12' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cxx_compiler: +- gxx +cxx_compiler_version: +- '12' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +rust_compiler: +- rust +target_platform: +- linux-ppc64le +zip_keys: +- - c_compiler_version + - cxx_compiler_version diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_.yaml new file mode 100644 index 0000000..cee55cd --- /dev/null +++ b/.ci_support/osx_arm64_.yaml @@ -0,0 +1,25 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +MACOSX_SDK_VERSION: +- '12.3' +c_compiler: +- clang +c_compiler_version: +- '15' +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cxx_compiler: +- clangxx +cxx_compiler_version: +- '15' +macos_machine: +- arm64-apple-darwin20.0.0 +rust_compiler: +- rust +target_platform: +- osx-arm64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version diff --git a/README.md b/README.md index 2ad3f95..729a334 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,20 @@ Current build status variant + + linux_aarch64 + + + variant + + + + linux_ppc64le + + + variant + + osx_64 @@ -44,6 +58,13 @@ Current build status variant + + osx_arm64 + + + variant + + win_64 diff --git a/conda-forge.yml b/conda-forge.yml index 4cb0e87..d1e2dd3 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -8,3 +8,13 @@ github: conda_build: error_overlinking: true conda_forge_output_validation: true +build_platform: + linux_aarch64: linux_64 + linux_ppc64le: linux_64 + osx_arm64: osx_64 +provider: + linux_aarch64: azure + linux_ppc64le: azure +bot: + abi_migration_branches: + - 0.14 diff --git a/recipe/bld.bat b/recipe/bld.bat index 062df3d..2bb4f67 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,6 +1,7 @@ @ECHO ON -copy %PREFIX%\\Library\\include\\webgpu.h ffi\\webgpu.h +set WGPU_NATIVE_VERSION=v%PKG_VERSION% +copy %PREFIX%\\Library\\include\\webgpu.h ffi\\webgpu-headers\\webgpu.h cargo-bundle-licenses --format yaml --output THIRDPARTY.yml if %ERRORLEVEL% neq 0 exit 1 diff --git a/recipe/build.sh b/recipe/build.sh index aa0215d..f92d64d 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -1,10 +1,19 @@ set -ex +export WGPU_NATIVE_VERSION=v${PKG_VERSION} export CARGO_PKG_VERSION=${PKG_VERSION} cargo-bundle-licenses --format yaml --output THIRDPARTY.yml -cp ${PREFIX}/include/webgpu.h ffi/webgpu.h +cp ${PREFIX}/include/webgpu.h ffi/webgpu-headers/webgpu.h -cargo build --release --all-features +CARGO_TARGET="${HOST}" +CARGO_TARGET="$(echo -n ${CARGO_TARGET} | sed "s/conda/unknown/")" +CARGO_TARGET="$(echo -n ${CARGO_TARGET} | sed "s/darwin.*/darwin/")" +CARGO_TARGET="$(echo -n ${CARGO_TARGET} | sed "s/arm64/aarch64/")" + +cargo build \ + --release \ + --all-features \ + --target ${CARGO_TARGET} rm target/CACHEDIR.TAG rm -rf target/release diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 5c5e6e2..145d817 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -8,11 +8,9 @@ package: source: url: https://github.com/gfx-rs/{{ name }}/archive/refs/tags/v{{ version }}.tar.gz sha256: d84de1dd26295cc0a6fdfc150e3018bda755b7620a1e8950edc96ecb5c2e4eef - patches: - - use_prefix.patch build: - number: 0 + number: 1 run_exports: # hmaarrfk: 2023/07/29 -- No clue .... - {{ pin_subpackage('wgpu-native', max_pin='x.x.x') }} @@ -27,7 +25,7 @@ requirements: - pkg-config - clangdev host: - - webgpu-headers + - webgpu-headers 0.0.0.2023.06 - clangdev test: diff --git a/recipe/use_prefix.patch b/recipe/use_prefix.patch deleted file mode 100644 index ab517f5..0000000 --- a/recipe/use_prefix.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/build.rs b/build.rs -index 1140455..4127ef3 100644 ---- a/build.rs -+++ b/build.rs -@@ -3,7 +3,6 @@ use std::path::PathBuf; - use std::process::Command; - - fn main() { -- println!("cargo:rerun-if-changed=ffi/webgpu-headers/webgpu.h"); - println!("cargo:rerun-if-changed=ffi/wgpu.h"); - - #[rustfmt::skip] -@@ -33,7 +32,6 @@ fn main() { - ("WGPUTextureView", "WGPUTextureViewImpl"), - ]; - let mut builder = bindgen::Builder::default() -- .header("ffi/webgpu-headers/webgpu.h") - .header("ffi/wgpu.h") - .parse_callbacks(Box::new(bindgen::CargoCallbacks)) - .blocklist_function("wgpuGetProcAddress") -diff --git a/ffi/wgpu.h b/ffi/wgpu.h -index 6e576ae..dd36031 100644 ---- a/ffi/wgpu.h -+++ b/ffi/wgpu.h -@@ -1,7 +1,7 @@ - #ifndef WGPU_H_ - #define WGPU_H_ - --#include "webgpu-headers/webgpu.h" -+#include "webgpu.h" - - typedef enum WGPUNativeSType { - // Start at 6 to prevent collisions with webgpu STypes -