-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (40 loc) · 1.53 KB
/
Linux-cmake.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
# This is a basic workflow to help you get started with Actions
name: Linux Build
# Controls when the workflow will run
# Triggers the workflow on push or pull request events and manually from the Actions tab
on:
workflow_dispatch:
env:
CMAKE_BUILD_PARALLEL_LEVEL: 8
jobs:
Linux:
runs-on: ubuntu-latest
env:
MAKEFLAGS: "-j 8"
steps:
- name: Configure clang
run: |
sudo apt-get update && sudo apt install -y clang
sudo apt install -y libc++-dev libc++abi-dev
sudo update-alternatives --set cc /usr/bin/clang
sudo update-alternatives --set c++ /usr/bin/clang++
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Install Rust dependencies
run: |
rustup update
rustup toolchain install stable
rustup default stable
rustup target add x86_64-unknown-linux-gnu
rustup target add wasm32-unknown-emscripten
cargo install cbindgen
- name: Create Build Directory
run: cmake -E make_directory ${{github.workspace}}/.build
- name: Configure CMake
working-directory: ${{github.workspace}}/.build
run: cmake -S ../build/Linux/ -DCMAKE_BUILD_TYPE=Release
- name: Compile
working-directory: ${{github.workspace}}/.build
run: make