-
Notifications
You must be signed in to change notification settings - Fork 2
81 lines (68 loc) · 2.34 KB
/
binary_debug.yml
File metadata and controls
81 lines (68 loc) · 2.34 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Binary (Debug)
on:
workflow_dispatch:
inputs:
os:
description: 'OS'
required: true
default: macos-latest
compiler:
description: 'Complier'
required: true
default: clang++
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
CMAKE_BUILD_PARALLEL_LEVEL: 8
jobs:
prepare:
runs-on: "ubuntu-latest"
steps:
- name: Input
run: echo "${{ github.event.inputs.os }} ${{ github.event.inputs.compiler }}"
- uses: actions/checkout@v4
with:
submodules: true
- name: Disable python library building
run: |
sed -i -e 's/"Build python library" ON/"Build python library" OFF/g' CMakeLists.txt
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: source-code
path: ${{ github.workspace }}
build:
needs: prepare
runs-on: ${{ github.event.inputs.os }}
steps:
- name: Install libomp (macOS)
if: contains(github.event.inputs.os, 'macos')
shell: bash
run: |
arch -x86_64 zsh
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
arch -x86_64 /usr/local/bin/brew install libomp
brew install libomp
- name: Check libomp in arm64/x86_64 and combine them using lipo (macOS)
if: contains(github.event.inputs.os, 'macos')
shell: bash
run: |
ls -l /opt/Homebrew/opt/libomp/lib/
ls -l /usr/local/opt/libomp/lib/
lipo /usr/local/opt/libomp/lib/libomp.dylib /opt/Homebrew/opt/libomp/lib/libomp.dylib -create -output ${{ github.workspace }}/libomp.dylib
- name: Download source code
uses: actions/download-artifact@v4
with:
name: source-code
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
env:
CXX: ${{ github.event.inputs.compiler }}
run: cmake $GITHUB_WORKSPACE -DCMAKE_CXX_COMPILER=${{ github.event.inputs.compiler }} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_STANDARD=11
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE