Skip to content

Commit

Permalink
ci: add external GHA build & test jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
kraszkow committed Jul 5, 2024
1 parent d94147f commit ad9355e
Showing 1 changed file with 169 additions and 0 deletions.
169 changes: 169 additions & 0 deletions .github/workflows/external.ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
## Copyright 2024 Intel Corporation
## SPDX-License-Identifier: Apache-2.0

name: Linux

on:
push:
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions: read-all

jobs:
build-rocky-8:
runs-on: ubuntu-latest
container:
image: rockylinux:8

steps:
- name: Install packages
run: |
echo "Installing build dependencies..."
dnf update -y
dnf group install "Development Tools" -y
dnf install git-lfs cmake wget -y
mkdir deps
cd deps
wget https://github.com/oneapi-src/oneTBB/releases/download/v2021.13.0/oneapi-tbb-2021.13.0-lin.tgz
tar -xvf oneapi-tbb-2021.13.0-lin.tgz
export TBB_ROOT=`pwd`/oneapi-tbb-2021.13.0
wget https://github.com/ispc/ispc/releases/download/v1.24.0/ispc-v1.24.0-linux.tar.gz
tar -xvf ispc-v1.24.0-linux.tar.gz
export PATH=$PATH:`pwd`/ispc-v1.24.0-linux/bin
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
lfs: true

- name: Build
run: |
mkdir build
cd build
cmake ..
make -j`nproc`
./oidnBenchmark -v 1
./oidnTest
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: build-rocky-8
path: build

test-rocky-8:
needs: build-rocky-8
runs-on: ubuntu-latest
container:
image: rockylinux:8

steps:
- name: Install packages
run: |
echo "Installing runtime dependencies..."
dnf install libglvnd-glx libglvnd-opengl -y
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: build-rocky-8

- name: Test
run: |
# Adding execution bit to binaries is needed since upload/download GHA is using zip compression
# and it can't preserve files permissions - https://github.com/actions/upload-artifact/issues/38
chmod +x ./bin/*
./bin/vklTutorialCPU
./bin/vklTutorialISPC
./bin/vklExamplesCPU -batch -printStats -spp 50 -framebufferSize 1024 1024
./bin/vklTestsCPU --durations yes
build-ubuntu-2204:
runs-on: ubuntu-latest
container:
image: ubuntu:22.04

steps:
- name: Install packages
run: |
echo "Installing build dependencies..."
apt update -y && apt upgrade -y
apt install build-essential cmake git-lfs wget python3 -y
mkdir deps
cd deps
wget https://github.com/oneapi-src/oneTBB/releases/download/v2021.13.0/oneapi-tbb-2021.13.0-lin.tgz
tar -xvf oneapi-tbb-2021.13.0-lin.tgz
export TBB_ROOT=`pwd`/oneapi-tbb-2021.13.0
wget https://github.com/ispc/ispc/releases/download/v1.24.0/ispc-v1.24.0-linux.tar.gz
tar -xvf ispc-v1.24.0-linux.tar.gz
export PATH=$PATH:`pwd`/ispc-v1.24.0-linux/bin
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
lfs: true

- name: Build
run: |
mkdir build
cd build
cmake ..
make -j`nproc`
./oidnBenchmark -v 1
./oidnTest
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: build-ubuntu-2204
path: build


test-ubuntu-2204:
needs: build-ubuntu-2204
runs-on: ubuntu-latest
container:
image: ubuntu:22.04

steps:
- name: Install packages
run: |
echo "Installing runtime dependencies..."
apt-get update
apt-get install libglfw3 libopengl0 -y
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: build-ubuntu-2204

- name: Test
run: |
# Adding execution bit to binaries is needed since upload/download GHA is using zip compression
# and it can't preserve files permissions - https://github.com/actions/upload-artifact/issues/38
chmod +x ./bin/*
# LD_LIBRARY_PATH must be set only because of libboost_iostreams.so.1.84.0
export LD_LIBRARY_PATH=./lib
./bin/vklTutorialCPU
./bin/vklTutorialISPC
./bin/vklExamplesCPU -batch -printStats -spp 50 -framebufferSize 1024 1024
./bin/vklTestsCPU --durations yes

0 comments on commit ad9355e

Please sign in to comment.