2023-01-16 01:06:15 -05:00
|
|
|
name: build librashader-capi
|
2023-01-15 15:13:32 -05:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "master" ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ "master" ]
|
2023-01-15 15:23:19 -05:00
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * 6"
|
2023-01-15 15:13:32 -05:00
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest]
|
2023-02-11 18:30:28 -05:00
|
|
|
profile: ['debug', 'release', 'optimized']
|
2023-01-16 20:24:13 -05:00
|
|
|
fail-fast: false
|
2023-01-15 15:13:32 -05:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
2023-01-16 01:06:15 -05:00
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install nightly Rust
|
2023-01-15 15:23:19 -05:00
|
|
|
uses: actions-rs/toolchain@v1.0.6
|
|
|
|
with:
|
|
|
|
toolchain: nightly
|
|
|
|
override: true
|
2023-01-16 01:06:15 -05:00
|
|
|
- name: Setup Vulkan SDK
|
|
|
|
uses: humbletim/setup-vulkan-sdk@v1.2.0
|
2023-01-15 15:59:53 -05:00
|
|
|
with:
|
|
|
|
vulkan-query-version: latest
|
|
|
|
vulkan-components: Vulkan-Headers, Vulkan-Loader, SPIRV-Cross, SPIRV-Headers, SPIRV-Reflect, SPIRV-Tools, Glslang
|
2023-01-15 18:14:27 -05:00
|
|
|
vulkan-use-cache: true
|
2023-02-05 02:14:15 -05:00
|
|
|
- uses: actions/setup-python@v1
|
|
|
|
name: Setup Python
|
|
|
|
with:
|
|
|
|
python-version: '3.x'
|
2023-02-06 02:20:11 -05:00
|
|
|
- run: pip install meson ninja mako
|
|
|
|
name: Install Meson for spirv-to-dxil-sys
|
2023-01-15 15:13:32 -05:00
|
|
|
- name: Build dynamic library
|
2023-02-11 18:05:50 -05:00
|
|
|
run: cargo run -p librashader-build-script -- --profile ${{ matrix.profile }}
|
2023-01-15 15:23:19 -05:00
|
|
|
- name: Upload build artifacts
|
2023-01-15 15:13:32 -05:00
|
|
|
uses: actions/upload-artifact@v3.1.2
|
|
|
|
with:
|
2023-02-11 18:05:50 -05:00
|
|
|
name: ${{ format('build-outputs-{0}-{1}', matrix.os, matrix.profile) }}
|
2023-02-11 18:37:35 -05:00
|
|
|
path: ${{ format('target/{0}/librashader.*', matrix.profile) }}
|