File tree Expand file tree Collapse file tree 2 files changed +63
-0
lines changed Expand file tree Collapse file tree 2 files changed +63
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Test whether we can link to LLVM installed from apt.llvm.org or Homebrew.
2
+
3
+ name : Test
4
+
5
+ on : push
6
+
7
+ jobs :
8
+ test-macos-llvm :
9
+ runs-on : macos-latest
10
+ steps :
11
+ - name : Checkout
12
+ uses : actions/checkout@v2
13
+ - name : Install LLVM
14
+ run : |
15
+ brew install llvm@11
16
+ - name : Test LLVM 11
17
+ run :
18
+ go test -v -tags=llvm11
19
+ - name : Test default LLVM
20
+ run :
21
+ go test -v
22
+ test-linux-llvm-12 :
23
+ runs-on : ubuntu-20.04
24
+ steps :
25
+ - name : Checkout
26
+ uses : actions/checkout@v2
27
+ - name : Install LLVM
28
+ run : |
29
+ echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main' | sudo tee /etc/apt/sources.list.d/llvm.list
30
+ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
31
+ sudo apt-get update
32
+ sudo apt-get install --no-install-recommends llvm-12-dev
33
+ - name : Test LLVM 12
34
+ run :
35
+ go test -v -tags=llvm12
36
+ - name : Test default LLVM
37
+ run :
38
+ go test -v
39
+ test-linux-llvm-11 :
40
+ runs-on : ubuntu-20.04
41
+ steps :
42
+ - name : Checkout
43
+ uses : actions/checkout@v2
44
+ - name : Install LLVM
45
+ run : |
46
+ echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main' | sudo tee /etc/apt/sources.list.d/llvm.list
47
+ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
48
+ sudo apt-get update
49
+ sudo apt-get install --no-install-recommends llvm-11-dev
50
+ - name : Test LLVM 11
51
+ run :
52
+ go test -v -tags=llvm11
Original file line number Diff line number Diff line change
1
+ package llvm_test
2
+
3
+ import "tinygo.org/x/go-llvm"
4
+
5
+ import "testing"
6
+
7
+ // Dummy test function.
8
+ // All it does is test whether we can use LLVM at all.
9
+ func TestLLVM (t * testing.T ) {
10
+ t .Log ("LLVM version:" , llvm .Version )
11
+ }
You can’t perform that action at this time.
0 commit comments