-
Notifications
You must be signed in to change notification settings - Fork 26
58 lines (44 loc) · 1.63 KB
/
build_linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Copyright (c) 2024, DyssolTEC GmbH.
# All rights reserved. This file is part of MUSEN framework http://msolids.net/musen.
# See LICENSE file for license and warranty information.
# A workflow for compilation on Linux
name: Ubuntu
on: [push]
jobs:
build:
name: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Update packages
run: sudo apt update && sudo apt upgrade
- name: Install build dependencies
run: sudo apt install build-essential cmake zlib1g-dev libprotobuf-dev protobuf-compiler libqt5opengl5-dev
- name: Install CUDA
if: ${{ matrix.os != 'ubuntu-22.04' }}
run: sudo apt install nvidia-cuda-toolkit
- name: Install CUDA versioned
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
${{github.workspace}}/scripts/install_cuda.sh
echo "/usr/local/cuda-11.7/bin" >> $GITHUB_PATH
- name: Create build environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Create install environment
run: cmake -E make_directory ${{github.workspace}}/install
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --parallel $(nproc)
- name: Install
working-directory: ${{github.workspace}}/build
shell: bash
run: make install