forked from tinygo-org/go-llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Test whether we can link to LLVM installed from apt.llvm.org or Homebrew. | ||
|
||
name: Test | ||
|
||
on: push | ||
|
||
jobs: | ||
test-macos-llvm: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install LLVM | ||
run: | | ||
brew install llvm@11 | ||
- name: Test LLVM 11 | ||
run: | ||
go test -v -tags=llvm11 | ||
- name: Test default LLVM | ||
run: | ||
go test -v | ||
test-linux-llvm-12: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install LLVM | ||
run: | | ||
echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main' | sudo tee /etc/apt/sources.list.d/llvm.list | ||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | ||
sudo apt-get update | ||
sudo apt-get install --no-install-recommends llvm-12-dev | ||
- name: Test LLVM 12 | ||
run: | ||
go test -v -tags=llvm12 | ||
- name: Test default LLVM | ||
run: | ||
go test -v | ||
test-linux-llvm-11: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install LLVM | ||
run: | | ||
echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main' | sudo tee /etc/apt/sources.list.d/llvm.list | ||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | ||
sudo apt-get update | ||
sudo apt-get install --no-install-recommends llvm-11-dev | ||
- name: Test LLVM 11 | ||
run: | ||
go test -v -tags=llvm11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package llvm_test | ||
|
||
import "tinygo.org/x/go-llvm" | ||
|
||
import "testing" | ||
|
||
// Dummy test function. | ||
// All it does is test whether we can use LLVM at all. | ||
func TestLLVM(t *testing.T) { | ||
t.Log("LLVM version:", llvm.Version) | ||
} |