forked from Twinklebear/oidn-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (50 loc) · 2.29 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: CI
on:
push:
pull_request:
schedule:
- cron: "0 0 * * 1"
env:
CARGO_TERM_COLOR: always
OIDN_VERSION: 2.2.2
jobs:
build_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: wget https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.x86_64.linux.tar.gz
- run: tar -xf oidn-${OIDN_VERSION}.x86_64.linux.tar.gz
- run: echo "OIDN_DIR=`pwd`/oidn-${OIDN_VERSION}.x86_64.linux" >> $GITHUB_ENV
- run: echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${OIDN_DIR}/lib" >> $GITHUB_ENV
- run: cargo build --all --all-targets
- run: cargo clippy --all --all-targets -- -D warnings
- run: cargo test --all
- run: cargo doc --all --no-deps --document-private-items
env:
RUSTDOCFLAGS: -Dwarnings
- name: Format Core
run: cargo fmt -- --check
build_mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: wget https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.arm64.macos.tar.gz
- run: tar -xf oidn-${OIDN_VERSION}.arm64.macos.tar.gz
- run: echo "OIDN_DIR=`pwd`/oidn-${OIDN_VERSION}.arm64.macos" >> $GITHUB_ENV
- run: echo "DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:${OIDN_DIR}/lib" >> $GITHUB_ENV
- run: cp $OIDN_DIR/lib/*dylib .
- run: cargo build --all --all-targets
- run: cargo clippy --all --all-targets -- -D warnings
build_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- run: choco install wget
- run: wget https://github.com/OpenImageDenoise/oidn/releases/download/v${env:OIDN_VERSION}/oidn-${env:OIDN_VERSION}.x64.windows.zip
- run: 7z x oidn-${env:OIDN_VERSION}.x64.windows.zip -y
- run: |
$env:OIDN_DIR="${env:GITHUB_WORKSPACE}/oidn-${env:OIDN_VERSION}.x64.windows/"
cargo build --all --all-targets
- run: |
$env:OIDN_DIR="${env:GITHUB_WORKSPACE}/oidn-${env:OIDN_VERSION}.x64.windows/"
cargo clippy --all --all-targets -- -D warnings