VS2022 17.11 / MSVC 1941 CI Fix #381
Workflow file for this run
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
# Compile project on Ubuntu | |
name: Ubuntu | |
on: | |
push: | |
branches: | |
- '**' | |
paths: | |
- "**" | |
- "!.github/**" | |
- ".github/workflows/Ubuntu.yml" | |
pull_request: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: ${{ matrix.cudacxx.os }} | |
strategy: | |
fail-fast: false | |
# Multiplicative build matrix | |
# optional exclude: can be partial, include: must be specific | |
matrix: | |
cudacxx: | |
- cuda: "12.0" | |
cuda_arch: "50" | |
hostcxx: gcc-12 | |
os: ubuntu-22.04 | |
- cuda: "11.2" | |
cuda_arch: "35" | |
hostcxx: gcc-8 | |
os: ubuntu-20.04 | |
config: | |
- name: "Release" | |
config: "Release" | |
# Name the job based on matrix/env options | |
name: "build (${{ matrix.cudacxx.cuda }}, ${{ matrix.config.name }}, ${{ matrix.cudacxx.os }})" | |
# Define job-wide env constants, and promote matrix elements to env constants for portable steps. | |
env: | |
# Define constants | |
BUILD_DIR: "build" | |
# Port matrix options to environment, for more portability. | |
CUDA: ${{ matrix.cudacxx.cuda }} | |
CUDA_ARCH: ${{ matrix.cudacxx.cuda_arch }} | |
HOSTCXX: ${{ matrix.cudacxx.hostcxx }} | |
OS: ${{ matrix.cudacxx.os }} | |
CONFIG: ${{ matrix.config.config }} | |
# Kept for portable steps between this and the main repository. | |
VISUALISATION: "ON" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install CUDA | |
if: ${{ startswith(env.OS, 'ubuntu') && env.CUDA != '' }} | |
env: | |
cuda: ${{ env.CUDA }} | |
run: .github/scripts/install_cuda_ubuntu.sh | |
- name: Install/Select gcc and g++ | |
if: ${{ startsWith(env.HOSTCXX, 'gcc-') }} | |
run: | | |
gcc_version=${HOSTCXX//gcc-/} | |
sudo apt-get install -y gcc-${gcc_version} g++-${gcc_version} | |
echo "CC=/usr/bin/gcc-${gcc_version}" >> $GITHUB_ENV | |
echo "CXX=/usr/bin/g++-${gcc_version}" >> $GITHUB_ENV | |
echo "CUDAHOSTCXX=/usr/bin/g++-${gcc_version}" >> $GITHUB_ENV | |
- name: Install Visualisation Dependencies | |
if: ${{ startswith(env.OS, 'ubuntu') && env.VISUALISATION == 'ON' }} | |
run: | | |
# Install ubuntu-22.04 packages | |
if [ "$OS" == 'ubuntu-22.04' ]; then | |
sudo apt-get install -y libglew-dev libfontconfig1-dev libsdl2-dev libdevil-dev libfreetype-dev | |
fi | |
if [ "$OS" == 'ubuntu-20.04' ]; then | |
sudo apt-get install -y libglew-dev libfontconfig1-dev libsdl2-dev libdevil-dev libfreetype-dev | |
fi | |
# Install Ubuntu 18.04 packages | |
if [ "$OS" == 'ubuntu-18.04' ]; then | |
sudo apt-get install -y libglew-dev libfontconfig1-dev libsdl2-dev libdevil-dev libfreetype6-dev libgl1-mesa-dev | |
fi | |
- name: Add custom problem matchers for annotations | |
run: echo "::add-matcher::.github/problem-matchers.json" | |
- name: Configure cmake | |
run: > | |
cmake . -B "${{ env.BUILD_DIR }}" | |
-DCMAKE_BUILD_TYPE="${{ env.CONFIG }}" | |
-Werror=dev | |
-DCMAKE_WARN_DEPRECATED="OFF" | |
-DFLAMEGPU_WARNINGS_AS_ERRORS="ON" | |
-DCMAKE_CUDA_ARCHITECTURES="${{ env.CUDA_ARCH }}" | |
- name: Build | |
working-directory: ${{ env.BUILD_DIR }} | |
run: cmake --build . --target all --verbose -j `nproc` |