Skip to content

Commit cbaf5ba

Browse files
committed
Switch CI to github actions
1 parent 8dcbf11 commit cbaf5ba

28 files changed

+65307
-119
lines changed

.github/workflows/check.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Check
2+
3+
on:
4+
push:
5+
branches-ignore: [staging.tmp]
6+
pull_request:
7+
branches-ignore: [staging.tmp]
8+
9+
jobs:
10+
ios_build:
11+
name: iOS Stable
12+
runs-on: macos-10.15
13+
env:
14+
TARGET: aarch64-apple-ios
15+
steps:
16+
- uses: actions/checkout@v2
17+
- run: rustup target add ${{ env.TARGET }}
18+
- run: make check-target
19+
20+
build:
21+
name: ${{ matrix.name }}
22+
runs-on: ${{ matrix.os }}
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
os: [ubuntu-18.04, macos-10.15, windows-2019]
27+
channel: [stable, nightly]
28+
exclude:
29+
- os: ubuntu-18.04
30+
channel: stable
31+
- os: macos-10.15
32+
channel: nightly
33+
- os: windows-2019
34+
channel: nightly
35+
include:
36+
- name: Ubuntu Nightly
37+
os: ubuntu-18.04
38+
channel: nightly
39+
- name: MacOS Stable
40+
os: macos-10.15
41+
channel: stable
42+
- name: Windows Stable
43+
os: windows-2019
44+
channel: stable
45+
steps:
46+
- name: Checkout code
47+
uses: actions/checkout@v2
48+
- if: matrix.channel == 'nightly'
49+
name: Install latest nightly
50+
uses: actions-rs/toolchain@v1
51+
with:
52+
toolchain: nightly
53+
override: true
54+
- if: matrix.os == 'windows-2019'
55+
name: Install make
56+
run: choco install make
57+
- run: make all

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
on:
2+
release:
3+
types: [published]
4+
5+
name: Release
6+
7+
jobs:
8+
build:
9+
name: ${{ matrix.name }}
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: [macos-10.15, windows-2019]
15+
include:
16+
- name: MacOS Stable
17+
os: macos-10.15
18+
key: macos
19+
- name: Windows Stable
20+
os: windows-2019
21+
key: windows
22+
steps:
23+
- uses: actions/checkout@v2
24+
- if: matrix.os == 'windows-2019'
25+
name: Install make
26+
run: choco install make
27+
- run: make gfx-portability.zip
28+
- name: Upload builds
29+
id: upload-release-asset
30+
uses: actions/upload-release-asset@v1
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
with:
34+
upload_url: ${{ github.event.release.upload_url }}
35+
asset_path: ./gfx-portability.zip
36+
asset_name: gfx-portability-${{ matrix.key }}-${{ github.event.release.tag_name }}.zip
37+
asset_content_type: application/zip

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 69 deletions
This file was deleted.

Makefile

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
VULKAN_DIR=modules/vulkan-docs/src
21
CTS_DIR=../VK-GL-CTS
32
CHERRY_DIR=../cherry
43
BINDING=target/vulkan.rs
54
NATIVE_DIR=target/native
65
NATIVE_TARGET=$(NATIVE_DIR)/test
76
NATIVE_OBJECTS=$(NATIVE_DIR)/test.o $(NATIVE_DIR)/window.o
8-
LIB_EXTENSION=
7+
LIB_FILE_NAME=
8+
LIB_VULKAN_NAME=
99
TEST_LIST=$(CURDIR)/conformance/deqp.txt
1010
TEST_LIST_SOURCE=$(CTS_DIR)/external/vulkancts/mustpass/1.0.2/vk-default.txt
1111
DEQP_DIR=$(CTS_DIR)/build/external/vulkancts/modules/vulkan/
1212
DEQP=cd $(DEQP_DIR) && RUST_LOG=debug LD_LIBRARY_PATH=$(FULL_LIBRARY_PATH) ./deqp-vk
1313
CLINK_ARGS=
14-
GIT_TAG=$(shell git describe --abbrev=0 --tags)
1514
GIT_TAG_FULL=$(shell git describe --tags)
1615
OS_NAME=
16+
ZIP_COMMAND=
1717

1818
DOTA_DIR=../dota2/bin/osx64
1919
DOTA_EXE=$(DOTA_DIR)/dota2.app/Contents/MacOS/dota2
@@ -29,38 +29,43 @@ DEBUGGER=rust-gdb --args
2929
GFX_METAL_RECORDING:=immediate
3030

3131
CC=g++
32-
CFLAGS=-std=c++11 -ggdb -O0 -I$(VULKAN_DIR)
32+
CFLAGS=-std=c++11 -ggdb -O0 -Iheaders
3333
DEPS=
3434
LDFLAGS=
3535

3636
ifeq ($(OS),Windows_NT)
3737
LDFLAGS=
3838
BACKEND=dx12
39-
LIB_EXTENSION=dll
39+
LIB_FILE_NAME=portability.dll
40+
LIB_VULKAN_NAME=vulkan.dll
4041
OS_NAME=windows
42+
ZIP_COMMAND=7z a -tzip
4143
else
4244
UNAME_S:=$(shell uname -s)
45+
ZIP_COMMAND=zip
4346
ifeq ($(UNAME_S),Linux)
4447
LDFLAGS=-lpthread -ldl -lm -lX11 -lxcb
4548
BACKEND=vulkan
46-
LIB_EXTENSION=so
49+
LIB_FILE_NAME=libportability.so
50+
LIB_VULKAN_NAME=libvulkan.so
4751
OS_NAME=linux
4852
endif
4953
ifeq ($(UNAME_S),Darwin)
5054
LDFLAGS=-lpthread -ldl -lm
5155
BACKEND=metal
5256
DEBUGGER=rust-lldb --
53-
LIB_EXTENSION=dylib
57+
LIB_FILE_NAME=libportability.dylib
58+
LIB_VULKAN_NAME=libvulkan.dylib
5459
CLINK_ARGS=-- -Clink-arg="-current_version 1.0.0" -Clink-arg="-compatibility_version 1.0.0"
5560
OS_NAME=macos
5661
endif
5762
endif
5863

5964
FULL_LIBRARY_PATH=$(CURDIR)/target/debug
60-
LIBRARY=target/debug/libportability.$(LIB_EXTENSION)
61-
LIBRARY_FAST=target/release/libportability.$(LIB_EXTENSION)
65+
LIBRARY=target/debug/$(LIB_FILE_NAME)
66+
LIBRARY_FAST=target/release/$(LIB_FILE_NAME)
6267

63-
.PHONY: all dummy rebuild debug release version-debug version-release binding run-native cts clean cherry dota-debug dota-release dota-orig dota-bench-gfx dota-bench-orig dota-bench-gl package memcpy-report
68+
.PHONY: all dummy check-target rebuild debug release version-debug version-release binding run-native cts clean cherry dota-debug dota-release dota-orig dota-bench-gfx dota-bench-orig dota-bench-gl memcpy-report
6469

6570
all: $(NATIVE_TARGET)
6671

@@ -80,6 +85,9 @@ version-debug:
8085
version-release:
8186
cargo rustc --release --manifest-path libportability/Cargo.toml --features $(BACKEND) $(CLINK_ARGS)
8287

88+
check-target:
89+
cargo check --manifest-path libportability/Cargo.toml --target $(TARGET) --features $(BACKEND)
90+
cargo check --manifest-path libportability-icd/Cargo.toml --target $(TARGET) --features $(BACKEND),portability-gfx/env_logger
8391

8492
dota-debug: version-debug $(DOTA_EXE)
8593
DYLD_LIBRARY_PATH=$(CURDIR)/target/debug:$(CURDIR)/$(DOTA_DIR) $(DOTA_EXE) $(DOTA_PARAMS)
@@ -116,8 +124,8 @@ endif
116124

117125
binding: $(BINDING)
118126

119-
$(BINDING): $(VULKAN_DIR)/vulkan/*.h
120-
bindgen --no-layout-tests --rustfmt-bindings $(VULKAN_DIR)/vulkan/vulkan.h -o $(BINDING)
127+
$(BINDING): headers/vulkan/*.h
128+
bindgen --no-layout-tests --rustfmt-bindings headers/vulkan/vulkan.h -o $(BINDING)
121129

122130
$(LIBRARY): dummy
123131
cargo build --manifest-path libportability/Cargo.toml --features $(BACKEND)
@@ -163,16 +171,16 @@ clean:
163171
rm -f $(NATIVE_OBJECTS) $(NATIVE_TARGET) $(BINDING)
164172
cargo clean
165173

166-
package: version-debug version-release
174+
gfx-portability.zip: version-debug version-release
167175
cargo build --manifest-path libportability-icd/Cargo.toml --features $(BACKEND)
168176
cargo build --manifest-path libportability-icd/Cargo.toml --features $(BACKEND) --release
169177
echo "$(GIT_TAG_FULL)" > commit-sha
170-
zip gfx-portability-$(OS_NAME)-$(GIT_TAG).zip target/*/libportability*.$(LIB_EXTENSION) libportability-icd/portability-$(OS_NAME)-*.json commit-sha
178+
$(ZIP_COMMAND) gfx-portability.zip target/*/$(LIB_FILE_NAME) libportability-icd/portability-$(OS_NAME)-*.json commit-sha
171179

172-
target/debug/libvulkan.$(LIB_EXTENSION):
173-
cd target/debug && ln -sf libportability.$(LIB_EXTENSION) libvulkan.$(LIB_EXTENSION)
180+
target/debug/$(LIB_VULKAN_NAME):
181+
cd target/debug && ln -sf $(LIB_FILE_NAME) $(LIB_VULKAN_NAME)
174182

175-
cherry: $(LIBRARY) target/debug/libvulkan.$(LIB_EXTENSION)
183+
cherry: $(LIBRARY) $(LIB_VULKAN_NAME)
176184
cd $(CHERRY_DIR) && rm -f Cherry.db && RUST_LOG=warn LD_LIBRARY_PATH=$(FULL_LIBRARY_PATH) go run server.go
177185

178186
memcpy-report:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## gfx-portability
2-
[![Build Status](https://travis-ci.org/gfx-rs/portability.svg?branch=master)](https://travis-ci.org/gfx-rs/portability)
3-
[![Gitter](https://badges.gitter.im/gfx-rs/portability.svg)](https://gitter.im/gfx-rs/portability)
2+
[![Build Status](https://github.com/gfx-rs/portability/workflows/check/badge.svg?branch=master)](https://github.com/gfx-rs/portability/actions)
3+
[![Matrix](https://img.shields.io/badge/Matrix-%23gfx%3Amatrix.org-blueviolet.svg)](https://matrix.to/#/#gfx:matrix.org)
44

55
This is a prototype library implementing [Vulkan Portability Initiative](https://www.khronos.org/blog/khronos-announces-the-vulkan-portability-initiative) using [gfx-hal](http://gfx-rs.github.io/2017/07/24/low-level.html). See gfx-rs [meta issue](https://github.com/gfx-rs/gfx/issues/1354) for backend limitations and further details.
66

appveyor.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

bors.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
status = [
2-
"continuous-integration/travis-ci/push",
3-
"continuous-integration/appveyor/branch"
2+
"Ubuntu Nightly",
3+
"MacOS Stable",
4+
"Windows Stable",
45
]

0 commit comments

Comments
 (0)