librashader/.github/workflows/build.yml

50 lines
1.3 KiB
YAML
Raw Normal View History

2023-01-16 17:06:15 +11:00
name: build librashader-capi
2023-01-16 07:13:32 +11:00
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
2023-01-16 07:23:19 +11:00
schedule:
- cron: "0 0 * * 6"
2023-01-16 07:13:32 +11:00
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
2023-02-12 10:30:28 +11:00
profile: ['debug', 'release', 'optimized']
fail-fast: false
2023-01-16 07:13:32 +11:00
runs-on: ${{ matrix.os }}
steps:
2023-01-16 17:06:15 +11:00
- name: Checkout repository
uses: actions/checkout@v3
- name: Install nightly Rust
2023-01-16 07:23:19 +11:00
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: nightly
override: true
2023-11-29 17:31:45 +11:00
- uses: actions/setup-python@v1
name: Setup Python
with:
python-version: '3.x'
2023-11-29 17:41:15 +11:00
- name: Install Vulkan SDK
uses: humbletim/install-vulkan-sdk@v1.1.1
2023-01-16 07:59:53 +11:00
with:
2023-11-29 17:41:15 +11:00
version: latest
cache: true
2023-02-06 18:20:11 +11:00
- run: pip install meson ninja mako
name: Install Meson for spirv-to-dxil-sys
# - if: runner.os == 'Windows'
# name: Install winflexbison
# run: choco install winflexbison3
2023-01-16 07:13:32 +11:00
- name: Build dynamic library
run: cargo run -p librashader-build-script -- --profile ${{ matrix.profile }}
2023-01-16 07:23:19 +11:00
- name: Upload build artifacts
2023-01-16 07:13:32 +11:00
uses: actions/upload-artifact@v3.1.2
with:
name: ${{ format('build-outputs-{0}-{1}', matrix.os, matrix.profile) }}
path: ${{ format('target/{0}/librashader.*', matrix.profile) }}