@@ -14,25 +14,19 @@ jobs:
14
14
- windows-latest
15
15
- macos-latest
16
16
- ubuntu-latest
17
+ # - macos-11 # arm64
17
18
d :
18
- - " ldc-1.27.1 "
19
+ - " ldc-1.28.0 "
19
20
node :
20
21
- 16
21
22
pnpm :
22
23
- 6
23
- clang :
24
- - 12.0.0
24
+ compiler :
25
+ - llvm- 12.0.0
25
26
cmake :
26
- - 3.20.2
27
+ - " 3.22.1 "
27
28
ninja :
28
- - 1.10.2
29
- CC :
30
- - clang
31
- CXX :
32
- - clang++
33
- env :
34
- CC : ${{ matrix.CC }}
35
- CXX : ${{ matrix.CXX }}
29
+ - " 1.10.2"
36
30
steps :
37
31
- uses : actions/checkout@v2
38
32
with :
@@ -49,40 +43,63 @@ jobs:
49
43
~/.pnpm-store
50
44
D:\.pnpm-store
51
45
./.dub
52
- ./llvm
53
- C:/Program Files/LLVM
54
- key : " cache-OS:${{ matrix.os }}-D:${{ matrix.d }}-Clang:${{ matrix.clang }}-dub:${{ hashFiles('./dub.selections.json')}}-pnpm:${{ hashFiles('./pnpm-lock.yaml') }}"
46
+ ~/llvm
47
+ key : " cache-OS:${{ matrix.os }}-D:${{ matrix.d }}-CXX:${{ matrix.compiler }}-dub:${{ hashFiles('./dub.selections.json')}}-pnpm:${{ hashFiles('./pnpm-lock.yaml') }}"
55
48
restore-keys : |
56
- "cache-OS:${{ matrix.os }}-D:${{ matrix.d }}-Clang :${{ matrix.clang }}"
49
+ "cache-OS:${{ matrix.os }}-D:${{ matrix.d }}-CXX :${{ matrix.compiler }}"
57
50
58
51
# Setup compilers and tools
59
-
60
- - name : Setup LLVM
61
- uses : KyleMayes/install-llvm-action@v1
62
- with :
63
- version : ${{ matrix.clang }}
64
- cached : ${{ steps.cache.outputs.cache-hit }}
65
-
66
- - name : Setup Cmake and Ninja
67
- uses : aminya/install-cmake@new-versions-and-arch
52
+ - name : Setup Cpp
53
+ uses : aminya/setup-cpp@v1
68
54
with :
55
+ compiler : ${{ matrix.compiler }}
69
56
cmake : ${{ matrix.cmake }}
70
57
ninja : ${{ matrix.ninja }}
71
58
59
+ - name : Setup D
60
+ uses : dlang-community/setup-dlang@v1
61
+ with :
62
+ compiler : ${{ matrix.d }}
63
+
64
+ - name : Setup Mac Arm64
65
+ shell : bash
66
+ if : contains(matrix.os, 'macos-11')
67
+ run : |
68
+ ARCH="arm64"
69
+ echo "ARCH=$ARCH" >> $GITHUB_ENV
70
+ echo "triple=$ARCH-apple-macos" >> $GITHUB_ENV
71
+ echo "DFLAGS='-mtriple=$triple -Xcc=target -Xcc=$ARCH-apple-macos'" >> $GITHUB_ENV
72
+ echo "CPPFLAGS=$CPPFLAGS -arch $ARCH" >> $GITHUB_ENV
73
+ echo "CFLAGS=$CFLAGS -arch $ARCH" >> $GITHUB_ENV
74
+ echo "LDFLAGS=$LDFLAGS -arch $ARCH" >> $GITHUB_ENV
75
+
76
+ # Manually install ldc
77
+ # Due to https://github.com/dlang-community/setup-dlang/issues/51
78
+ curl -LJO https://github.com/ldc-developers/ldc/releases/download/v1.28.0/ldc2-1.28.0-osx-$ARCH.tar.xz
79
+ tar -xf ldc2-1.28.0-osx-$ARCH.tar.xz
80
+ rm ldc2-1.28.0-osx-$ARCH.tar.xz
81
+
82
+ LDC_PATH="~/ldc"
83
+ mkdir -p $LDC_PATH
84
+ mv ldc2-1.28.0-osx-$ARCH $LDC_PATH
85
+
86
+ # Activate ldc
87
+ echo "LIBRARY_PATH=$LDC_PATH/lib${LIBRARY_PATH:+:}${LIBRARY_PATH:-}" >> $GITHUB_ENV
88
+ echo "LD_LIBRARY_PATH=$LDC_PATH/lib${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH:-}" >> $GITHUB_ENV
89
+ echo "PATH=$LDC_PATH/bin${PATH:+:}${PATH:-}" >> $GITHUB_ENV
90
+ echo "DMD=ldmd2" >> $GITHUB_ENV
91
+ echo "DC=ldc2" >> $GITHUB_ENV
92
+
72
93
- name : Setup Node
73
94
uses : actions/setup-node@v2
74
95
with :
75
96
node-version : ${{ matrix.node }}
97
+
76
98
- name : Setup Pnpm
77
99
uses : pnpm/action-setup@v2
78
100
with :
79
101
version : ${{ matrix.pnpm }}
80
102
81
- - name : Setup D
82
- uses : dlang-community/setup-dlang@v1
83
- with :
84
- compiler : ${{ matrix.d }}
85
-
86
103
# Build and Test
87
104
88
105
- name : Install dependencies
0 commit comments