Remove intentional assertion #28
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
# Copyright (C) 2021 Intel Corporation | |
# SPDX-License-Identifier: BSD-3-Clause | |
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions | |
name: build on Linux | |
# https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/ | |
permissions: | |
# Grant read permissions to repository in case it is not a forked public | |
# repository, but a private repository that was created manually. | |
contents: read | |
# Grant read permissions to private container images. | |
packages: read | |
on: | |
push: | |
paths: | |
- '**' | |
- '!**.md' | |
- '!**/.clang-format' | |
- '!**/COPYING' | |
- '!**/LICENSE' | |
- '!.github/**' | |
- '.github/workflows/build-linux.yml' | |
- '!.gitignore' | |
- '!cmake/manifests/**' | |
- 'cmake/manifests/linux/**' | |
- '!container/**' | |
- '!docs/**' | |
- '!scripts/**' | |
pull_request: | |
paths: | |
- '**' | |
- '!**.md' | |
- '!**/.clang-format' | |
- '!**/COPYING' | |
- '!**/LICENSE' | |
- '!.github/**' | |
- '.github/workflows/build-linux.yml' | |
- '!.gitignore' | |
- '!cmake/manifests/**' | |
- 'cmake/manifests/linux/**' | |
- '!container/**' | |
- '!docs/**' | |
- '!scripts/**' | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
container: | |
image: ghcr.io/intel/fpga-runtime-for-opencl/${{ matrix.image }}:main | |
strategy: | |
matrix: | |
image: | |
- rockylinux-8-dev | |
- rockylinux-9-dev | |
- opensuse-leap-15-dev | |
- ubuntu-18.04-dev | |
- ubuntu-20.04-dev | |
- ubuntu-22.04-dev | |
config: | |
- Debug | |
- Release | |
include: | |
- cross: arm-linux-gnueabihf- | |
image: debian-11-arm-dev | |
config: Debug | |
- cross: arm-linux-gnueabihf- | |
image: debian-11-arm-dev | |
config: Release | |
continue-on-error: true | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v3 | |
- name: query distribution | |
run: cat /etc/os-release | |
- name: create build directory | |
run: mkdir build | |
- name: create build files | |
run: | | |
test ${{ matrix.config }} = Debug && ASAN=1 | |
cd build | |
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_INSTALL_PREFIX=/fpga-runtime-for-opencl -DCMAKE_INSTALL_LIBDIR=lib ${ASAN:+-DACL_WITH_ASAN=ON} | |
env: | |
CC: ${{ matrix.cross }}gcc | |
CXX: ${{ matrix.cross }}g++ | |
- name: build runtime | |
run: | | |
cd build | |
ninja -v -k0 | |
- name: test runtime | |
if: ${{ !matrix.cross }} | |
run: | | |
cd build | |
ctest -V | |
- name: create user-writable install prefix | |
run: sudo install -d -m 1777 /fpga-runtime-for-opencl | |
- name: install runtime | |
run: | | |
cd build | |
cmake -P cmake_install.cmake | |
- name: upload binary package | |
if: github.event_name == 'push' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: fpga-runtime-for-opencl-${{ github.sha }}-${{ matrix.image }}-${{ matrix.config }}-${{ github.run_id }} | |
path: /fpga-runtime-for-opencl | |
if-no-files-found: error | |
- name: install components | |
run: | | |
cd build | |
cmake -DCOMPONENT=CL -P cmake_install.cmake | |
cmake -DCOMPONENT=CppUTest -P cmake_install.cmake | |
cmake -DCOMPONENT=MMD -P cmake_install.cmake | |
cmake -DCOMPONENT=acl -P cmake_install.cmake | |
cmake -DCOMPONENT=acl_check_sys_cmd -P cmake_install.cmake | |
cmake -DCOMPONENT=acl_hash -P cmake_install.cmake | |
cmake -DCOMPONENT=acl_threadsupport -P cmake_install.cmake | |
cmake -DCOMPONENT=pkg_editor -P cmake_install.cmake | |
- name: ensure manifests of installed components are unchanged | |
run: | | |
rm -rf "$manifests" | |
mkdir -p "$manifests" | |
cp -t "$manifests" build/install_manifest*.txt | |
git add "$manifests" | |
git diff --cached --exit-code | |
env: | |
manifests: cmake/manifests/linux | |
- name: upload manifests if installed components changed | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: manifests-${{ matrix.image }}-${{ matrix.config }}-${{ github.run_id }} | |
path: build/install_manifest*.txt | |
if-no-files-found: error |