-
Notifications
You must be signed in to change notification settings - Fork 43
70 lines (68 loc) · 2.17 KB
/
test-linux-mac.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
name: test-linux-mac
on:
- push
- pull_request
defaults:
run:
shell: bash
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- "1.6"
- "1.10"
- "nightly"
os:
- ubuntu-latest
- macos-13
arch:
- x64
include:
- os: macos-14
arch: aarch64
version: "1.10"
- os: macos-14
arch: aarch64
version: "nightly"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- name: Build and test
env:
body: ${{ github.event.pull_request.body }}
run: |
package="$(echo "$body" | sed -n '1p')"
if [ -z "${package}" ]; then
package="https://github.com/JuliaInterop/CxxWrap.jl.git"
fi
if [[ "$OSTYPE" != "darwin"* ]]; then
rm -f /opt/hostedtoolcache/julia/1.6*/x64/lib/julia/libstdc++.so.6
fi
mkdir build && cd build
CXXFLAGS=-ftemplate-backtrace-limit=0 cmake -DCMAKE_INSTALL_PREFIX=$HOME/install -DAPPEND_OVERRIDES_TOML=ON -DCMAKE_BUILD_TYPE=Debug ..
VERBOSE=ON cmake --build . --config Debug --target install
wget https://github.com/JuliaBinaryWrappers/libcxxwrap_julia_jll.jl/raw/main/Project.toml
jllversion=$(grep "version" Project.toml | sed -r 's/.* = "(.*)\+.*/\1/')
cd lib
if [ ! -f libcxxwrap_julia.${jllversion}.dylib ]; then
ln -s libcxxwrap_julia.*.*.*.* libcxxwrap_julia.${jllversion}.dylib
fi
cd ..
ls -al lib
julia -e "using Pkg; pkg\"add ${package}\"; using CxxWrap"
ctest -V
- name: Build testlib
run: |
cd testlib-builder
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$HOME/install ../src/testlib
cmake --build . --config Release