-
Notifications
You must be signed in to change notification settings - Fork 179
108 lines (97 loc) · 2.92 KB
/
multi.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Multithreading configuration
on:
push:
branches:
- '**' # all branches
pull_request:
branches:
- '**' # all branches
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows Latest - MSVC",
artifact: "windows-msvc.tar.xz",
os: windows-latest,
cc: "cl",
}
- {
name: "Windows Latest - MinGW",
artifact: "windows-mingw.tar.xz",
os: windows-latest,
cc: "gcc"
}
- {
name: "Ubuntu Latest - GCC",
artifact: "linux-gcc.tar.xz",
os: ubuntu-latest,
cc: "gcc",
}
- {
name: "Ubuntu Latest - Clang",
artifact: "linux-clang.tar.xz",
os: ubuntu-latest,
cc: "clang",
}
- {
name: "MacOS Latest",
os: macos-latest,
cc: "clang",
}
steps:
- uses: actions/checkout@v4
- name: Install Linux Dependencies
if: ${{ (runner.os == 'Linux') && (matrix.config.cc == 'clang') }}
run: sudo apt install libomp5 libomp-dev
- name: Set Windows enviroment
if: ${{ (runner.os == 'Windows') && (matrix.config.cc == 'cl') }}
uses: ilammy/msvc-dev-cmd@v1
- name: Set MinGW enviroment
if: ${{ (runner.os == 'Windows') && (matrix.config.cc == 'gcc') }}
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
install: >-
git
base-devel
gcc
cmake
update: true
- name: Set MacOS enviroment
if: ${{ (runner.os == 'MacOS') && (matrix.config.cc == 'clang') }}
shell: bash
run: |
curl -O https://mac.r-project.org/openmp/openmp-13.0.0-darwin21-Release.tar.gz
sudo tar fvxz openmp-*.tar.gz -C /
- name: Run CMake (Win)
if: ${{ (runner.os == 'Windows') && (matrix.config.cc == 'cl') }}
shell: bash
run: |
mkdir build
cd build
cmake -DSEED= -DBENCH=0 -DCORES=2 -DMULTI=OPENMP -G "NMake Makefiles" ..
- name: Run CMake (MingW)
if: ${{ (runner.os == 'Windows') && (matrix.config.cc == 'gcc') }}
shell: bash
run: |
mkdir build
cd build
cmake -DSEED= -DBENCH=0 -DCORES=2 -DMULTI=OPENMP -G "MinGW Makefiles" ..
- name: Run CMake (standard)
if: ${{ !(runner.os == 'Windows') }}
shell: bash
run: |
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DSEED= -DBENCH=0 -DCORES=2 -DMULTI=OPENMP ..
- name: CMake Build
run: cmake --build build
- name: CMake Test
run: |
cd build
ctest --verbose .