Skip to content

Commit

Permalink
.github/workflows/linux.yml: create ci
Browse files Browse the repository at this point in the history
  • Loading branch information
WolframRhodium committed Apr 14, 2022
1 parent 698c2a8 commit 1d6616e
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Build (Linux)

on:
push:
paths:
- 'source/nlm.ispc'
- 'source/vsnlm.cpp'
- '.github/workflows/linux.yml'
workflow_dispatch:

jobs:
build-linux:
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup GCC
run: |
sudo apt-get update
sudo apt-get install -y g++-11
- name: Download ISPC
run: |
curl -s -o ispc.tar.gz -LJO https://github.com/ispc/ispc/releases/download/v1.17.0/ispc-v1.17.0-linux.tar.gz
tar -xzf ispc.tar.gz
mv ispc-*/ ispc/
- name: Download VapourSynth headers
run: |
wget -q -O vs.zip https://github.com/vapoursynth/vapoursynth/archive/refs/tags/R57.zip
unzip -q vs.zip
mv vapoursynth*/ vapoursynth
- name: Setup Ninja
run: pip install ninja

- name: Configure
run: cmake -S . -B build -G Ninja -LA
-D CMAKE_BUILD_TYPE=Release
-D CMAKE_CXX_FLAGS="-Wall"
-D CMAKE_ISPC_COMPILER="$(pwd)/ispc/bin/ispc"
-D CMAKE_ISPC_INSTRUCTION_SETS="sse2-i32x4;avx1-i32x4;avx2-i32x8"
-D CMAKE_ISPC_FLAGS="--opt=fast-math"
-D VS_INCLUDE_DIR="`pwd`/vapoursynth/include"
env:
CXX: g++-11

- name: Build
run: cmake --build build --verbose

- name: Install
run: cmake --install build --prefix install

- name: Upload
uses: actions/upload-artifact@v2
if: false
with:
name: Linux-x64
path: install/lib/*.so

0 comments on commit 1d6616e

Please sign in to comment.