mirror of
https://github.com/italicsjenga/portability.git
synced 2024-11-26 17:01:31 +11:00
Merge #222
222: Add basic iOS target r=kvark a=kvark Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
This commit is contained in:
commit
ad2e228947
19
.github/workflows/release.yml
vendored
19
.github/workflows/release.yml
vendored
|
@ -11,20 +11,25 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-10.15, windows-2019]
|
name: ['macOS stable', 'iOS stable', 'Windows stable']
|
||||||
include:
|
include:
|
||||||
- name: MacOS Stable
|
- name: macOS stable
|
||||||
os: macos-10.15
|
os: macos-10.15
|
||||||
key: macos
|
target: x86_64-apple-darwin
|
||||||
- name: Windows Stable
|
- name: iOS stable
|
||||||
|
os: macos-10.15
|
||||||
|
target: aarch64-apple-ios
|
||||||
|
- name: Windows stable
|
||||||
os: windows-2019
|
os: windows-2019
|
||||||
key: windows
|
target: x86_64-pc-windows-msvc
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- if: matrix.os == 'windows-2019'
|
- if: matrix.os == 'windows-2019'
|
||||||
name: Install make
|
name: Install make
|
||||||
run: choco install make
|
run: choco install make
|
||||||
- run: make gfx-portability.zip
|
- run: rustup target add ${{ matrix.target }}
|
||||||
|
- name: Build
|
||||||
|
run: make CARGO_BUILD_TARGET=${{ matrix.target }} gfx-portability.zip
|
||||||
- name: Upload builds
|
- name: Upload builds
|
||||||
id: upload-release-asset
|
id: upload-release-asset
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
|
@ -33,5 +38,5 @@ jobs:
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ github.event.release.upload_url }}
|
upload_url: ${{ github.event.release.upload_url }}
|
||||||
asset_path: ./gfx-portability.zip
|
asset_path: ./gfx-portability.zip
|
||||||
asset_name: gfx-portability-${{ matrix.key }}-${{ github.event.release.tag_name }}.zip
|
asset_name: gfx-portability-${{ github.event.release.tag_name }}.${{ matrix.target }}.zip
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
|
|
9
Makefile
9
Makefile
|
@ -33,6 +33,12 @@ CFLAGS=-std=c++11 -ggdb -O0 -Iheaders
|
||||||
DEPS=
|
DEPS=
|
||||||
LDFLAGS=
|
LDFLAGS=
|
||||||
|
|
||||||
|
ifeq ($(CARGO_BUILD_TARGET),)
|
||||||
|
JSON_SUFFIX=$(OS_NAME)-*
|
||||||
|
else
|
||||||
|
JSON_SUFFIX=$(CARGO_BUILD_TARGET)
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
LDFLAGS=
|
LDFLAGS=
|
||||||
BACKEND=dx12
|
BACKEND=dx12
|
||||||
|
@ -56,6 +62,7 @@ else
|
||||||
DEBUGGER=rust-lldb --
|
DEBUGGER=rust-lldb --
|
||||||
LIB_FILE_NAME=libportability.dylib
|
LIB_FILE_NAME=libportability.dylib
|
||||||
LIB_VULKAN_NAME=libvulkan.dylib
|
LIB_VULKAN_NAME=libvulkan.dylib
|
||||||
|
#TODO: find a more idiomatic way to pass this arguments!
|
||||||
CLINK_ARGS=-- -Clink-arg="-current_version 1.0.0" -Clink-arg="-compatibility_version 1.0.0"
|
CLINK_ARGS=-- -Clink-arg="-current_version 1.0.0" -Clink-arg="-compatibility_version 1.0.0"
|
||||||
OS_NAME=macos
|
OS_NAME=macos
|
||||||
endif
|
endif
|
||||||
|
@ -175,7 +182,7 @@ gfx-portability.zip: version-debug version-release
|
||||||
cargo build --manifest-path libportability-icd/Cargo.toml --features $(BACKEND)
|
cargo build --manifest-path libportability-icd/Cargo.toml --features $(BACKEND)
|
||||||
cargo build --manifest-path libportability-icd/Cargo.toml --features $(BACKEND) --release
|
cargo build --manifest-path libportability-icd/Cargo.toml --features $(BACKEND) --release
|
||||||
echo "$(GIT_TAG_FULL)" > commit-sha
|
echo "$(GIT_TAG_FULL)" > commit-sha
|
||||||
$(ZIP_COMMAND) gfx-portability.zip target/*/$(LIB_FILE_NAME) libportability-icd/portability-$(OS_NAME)-*.json commit-sha
|
$(ZIP_COMMAND) gfx-portability.zip target/$(CARGO_BUILD_TARGET)/*/$(LIB_FILE_NAME) libportability-icd/portability-$(JSON_SUFFIX).json commit-sha
|
||||||
|
|
||||||
target/debug/$(LIB_VULKAN_NAME):
|
target/debug/$(LIB_VULKAN_NAME):
|
||||||
cd target/debug && ln -sf $(LIB_FILE_NAME) $(LIB_VULKAN_NAME)
|
cd target/debug && ln -sf $(LIB_FILE_NAME) $(LIB_VULKAN_NAME)
|
||||||
|
|
7
libportability-icd/portability-aarch64-apple-ios.json
Normal file
7
libportability-icd/portability-aarch64-apple-ios.json
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"file_format_version": "1.0.0",
|
||||||
|
"ICD": {
|
||||||
|
"library_path": "../target/aarch64-apple-ios/release/libportability_icd.dylib",
|
||||||
|
"api_version": "1.0.0"
|
||||||
|
}
|
||||||
|
}
|
7
libportability-icd/portability-x86_64-apple-darwin.json
Normal file
7
libportability-icd/portability-x86_64-apple-darwin.json
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"file_format_version": "1.0.0",
|
||||||
|
"ICD": {
|
||||||
|
"library_path": "../target/x86_64-apple-darwin/release/libportability_icd.dylib",
|
||||||
|
"api_version": "1.0.0"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"file_format_version": "1.0.0",
|
||||||
|
"ICD": {
|
||||||
|
"library_path": "..\\target\\x86_64-pc-windows-msvc\\release\\portability_icd.dll",
|
||||||
|
"api_version": "1.0.0"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue