Merge pull request #282 from visualfc/runtime #5
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
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Go | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
test-macos: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
llvm: [17] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update Homebrew | |
if: matrix.llvm == 17 # needed as long as LLVM 17 is still fresh | |
run: brew update | |
- name: Install LLVM ${{ matrix.llvm }} | |
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install llvm@${{ matrix.llvm }} | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.20' | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test -v ./... | |
test-linux: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
llvm: [17] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install LLVM ${{ matrix.llvm }} | |
run: | | |
echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-${{ matrix.llvm }} 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-${{ matrix.llvm }}-dev | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.20' | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test -v -coverprofile="coverage.txt" -covermode=atomic ./... | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: goplus/llgo |