Adjust make files following libva #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: [ push, pull_request ] | |
env: | |
CFLAGS: -O2 -Wformat -Wformat-security -Wall -Werror -D_FORTIFY_SOURCE=2 -fstack-protector-strong | |
jobs: | |
clang15: | |
runs-on: ubuntu-22.04 | |
env: | |
CC: /usr/bin/clang-15 | |
CXX: /usr/bin/clang++-15 | |
ASM: /usr/bin/clang-15 | |
steps: | |
- name: checkout libmfx | |
uses: actions/checkout@v2 | |
with: | |
path: libmfx | |
- name: checkout libva | |
uses: actions/checkout@v2 | |
with: | |
repository: intel/libva | |
path: libva | |
- name: install toolchain | |
run: | | |
if [[ -e $CC && -e $CXX ]]; then \ | |
echo "clang-15 already presents in the image"; \ | |
else \ | |
echo "clang-15 missed in the image, installing from llvm"; \ | |
echo "deb [trusted=yes] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" | sudo tee -a /etc/apt/sources.list; \ | |
sudo apt-get update; \ | |
sudo apt-get install -y --no-install-recommends clang-15; \ | |
fi | |
- name: install prerequisites | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends \ | |
cmake \ | |
libdrm-dev \ | |
libegl1-mesa-dev \ | |
libgl1-mesa-dev \ | |
libx11-dev \ | |
libx11-xcb-dev \ | |
libxcb-dri3-dev \ | |
libxcb-present-dev \ | |
libxext-dev \ | |
libxfixes-dev \ | |
libwayland-dev \ | |
ocl-icd-opencl-dev \ | |
opencl-clhpp-headers \ | |
make | |
- name: print tools versions | |
run: | | |
cmake --version | |
$CC --version | |
$CXX --version | |
- name: build libva | |
run: | | |
cd libva | |
./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu | |
make -j$(nproc) | |
sudo make install | |
- name: build libmfx | |
run: | | |
cd libmfx | |
mkdir build && cd build | |
cmake -DAPI=latest -DBUILD_ALL=ON -DENABLE_ALL=ON -DENABLE_ITT=OFF -DCMAKE_C_FLAGS_RELEASE="$CFLAGS" -DCMAKE_CXX_FLAGS_RELEASE="$CFLAGS" .. | |
make -j$(nproc) | |
make test | |
sudo make install | |
clang14: | |
runs-on: ubuntu-22.04 | |
env: | |
CC: /usr/bin/clang-14 | |
CXX: /usr/bin/clang++-14 | |
ASM: /usr/bin/clang-14 | |
steps: | |
- name: checkout libmfx | |
uses: actions/checkout@v2 | |
with: | |
path: libmfx | |
- name: checkout libva | |
uses: actions/checkout@v2 | |
with: | |
repository: intel/libva | |
path: libva | |
- name: install prerequisites | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends \ | |
cmake \ | |
libdrm-dev \ | |
libegl1-mesa-dev \ | |
libgl1-mesa-dev \ | |
libx11-dev \ | |
libx11-xcb-dev \ | |
libxcb-dri3-dev \ | |
libxcb-present-dev \ | |
libxext-dev \ | |
libxfixes-dev \ | |
libwayland-dev \ | |
ocl-icd-opencl-dev \ | |
opencl-clhpp-headers \ | |
make | |
- name: print tools versions | |
run: | | |
cmake --version | |
$CC --version | |
$CXX --version | |
- name: build libva | |
run: | | |
cd libva | |
./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu | |
make -j$(nproc) | |
sudo make install | |
- name: build libmfx | |
run: | | |
cd libmfx | |
mkdir build && cd build | |
cmake -DBUILD_ALL=ON -DENABLE_ALL=ON -DENABLE_ITT=OFF -DCMAKE_C_FLAGS_RELEASE="$CFLAGS" -DCMAKE_CXX_FLAGS_RELEASE="$CFLAGS" .. | |
make -j$(nproc) | |
make test | |
sudo make install | |
gcc11: | |
runs-on: ubuntu-22.04 | |
env: | |
CC: /usr/bin/gcc-11 | |
CXX: /usr/bin/g++-11 | |
ASM: /usr/bin/gcc-11 | |
# TODO: mind no -Werror | |
# We stepped into https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100366 | |
# gcc-11 throws -Wstringop-overflow on some std:: operations | |
CFLAGS: -O2 -Wformat -Wformat-security -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong | |
steps: | |
- name: checkout libmfxgen | |
uses: actions/checkout@v2 | |
with: | |
path: libmfxgen | |
- name: checkout libva | |
uses: actions/checkout@v2 | |
with: | |
repository: intel/libva | |
path: libva | |
- name: install prerequisites | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends \ | |
automake \ | |
cmake \ | |
gcc \ | |
g++ \ | |
libtool \ | |
libdrm-dev \ | |
libegl1-mesa-dev \ | |
libgl1-mesa-dev \ | |
libx11-dev \ | |
libx11-xcb-dev \ | |
libxcb-dri3-dev \ | |
libxcb-present-dev \ | |
libxext-dev \ | |
libxfixes-dev \ | |
libwayland-dev \ | |
ninja-build \ | |
pkg-config \ | |
make | |
- name: print tools versions | |
run: | | |
cmake --version | |
$CC --version | |
$CXX --version | |
- name: build libva | |
run: | | |
cd libva | |
./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu | |
make -j$(nproc) | |
sudo make install | |
- name: build libmfxgen | |
run: | | |
cd libmfxgen | |
mkdir build && cd build | |
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS_RELEASE="$CFLAGS" -DCMAKE_CXX_FLAGS_RELEASE="$CFLAGS" .. | |
ninja | |
sudo ninja install | |
gcc10: | |
runs-on: ubuntu-20.04 | |
env: | |
CC: /usr/bin/gcc-10 | |
CXX: /usr/bin/g++-10 | |
ASM: /usr/bin/gcc-10 | |
steps: | |
- name: checkout libmfx | |
uses: actions/checkout@v2 | |
with: | |
path: libmfx | |
- name: checkout libva | |
uses: actions/checkout@v2 | |
with: | |
repository: intel/libva | |
path: libva | |
- name: install prerequisites | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends \ | |
cmake \ | |
libdrm-dev \ | |
libegl1-mesa-dev \ | |
libgl1-mesa-dev \ | |
libx11-dev \ | |
libx11-xcb-dev \ | |
libxcb-dri3-dev \ | |
libxcb-present-dev \ | |
libxext-dev \ | |
libxfixes-dev \ | |
libwayland-dev \ | |
ocl-icd-opencl-dev \ | |
opencl-clhpp-headers \ | |
make | |
- name: print tools versions | |
run: | | |
cmake --version | |
$CC --version | |
$CXX --version | |
- name: build libva | |
run: | | |
cd libva | |
./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu | |
make -j$(nproc) | |
sudo make install | |
- name: build libmfx | |
run: | | |
cd libmfx | |
mkdir build && cd build | |
cmake -DBUILD_ALL=ON -DENABLE_ALL=ON -DENABLE_ITT=OFF -DCMAKE_C_FLAGS_RELEASE="$CFLAGS" -DCMAKE_CXX_FLAGS_RELEASE="$CFLAGS" .. | |
make -j$(nproc) | |
make test | |
sudo make install | |
gcc10-fastboot: | |
runs-on: ubuntu-20.04 | |
env: | |
CC: /usr/bin/gcc-10 | |
CXX: /usr/bin/g++-10 | |
ASM: /usr/bin/gcc-10 | |
steps: | |
- name: checkout libmfx | |
uses: actions/checkout@v2 | |
with: | |
path: libmfx | |
- name: checkout libva | |
uses: actions/checkout@v2 | |
with: | |
repository: intel/libva | |
path: libva | |
- name: install prerequisites | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends \ | |
cmake \ | |
libdrm-dev \ | |
libegl1-mesa-dev \ | |
libgl1-mesa-dev \ | |
libx11-dev \ | |
libx11-xcb-dev \ | |
libxcb-dri3-dev \ | |
libxcb-present-dev \ | |
libxext-dev \ | |
libxfixes-dev \ | |
libwayland-dev \ | |
ocl-icd-opencl-dev \ | |
opencl-clhpp-headers \ | |
make | |
- name: print tools versions | |
run: | | |
cmake --version | |
$CC --version | |
$CXX --version | |
- name: build libva | |
run: | | |
cd libva | |
./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu | |
make -j$(nproc) | |
sudo make install | |
- name: build libmfx | |
run: | | |
cd libmfx | |
mkdir build && cd build | |
cmake -DMFX_CONFIG_FILE=$(pwd)/../builder/profiles/fastboot.cmake -DCMAKE_C_FLAGS_RELEASE="$CFLAGS" -DCMAKE_CXX_FLAGS_RELEASE="$CFLAGS" .. | |
make -j$(nproc) | |
sudo make install |