-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 changed file
with
105 additions
and
77 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 |
---|---|---|
@@ -1,83 +1,111 @@ | ||
on: [push, pull_request] | ||
name: BuildAndTest | ||
jobs: | ||
ubuntu: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- { go-version: 1.22.x, dwarf-version: 3} | ||
- { go-version: 1.22.x, dwarf-version: 4} | ||
- { go-version: 1.22.x, dwarf-version: 5} | ||
armv7_job: | ||
# taken from https://github.com/marketplace/actions/run-on-architecture | ||
# The host should always be Linux | ||
runs-on: ubuntu-22.04 | ||
name: Build on ubuntu-22.04 armv7 | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: prerequisites # ubuntu speicific | ||
run: sudo apt-get install check | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Test | ||
env: | ||
GO111MODULE: on | ||
run: go test -cover ./... | ||
- name: Build | ||
run: go build | ||
- name: Examples test | ||
run: make test all DWARF_VER_FORCE=${{matrix.dwarf-version}} | ||
- uses: actions/checkout@v4 | ||
- uses: uraimo/run-on-arch-action@v2 | ||
name: Run commands | ||
id: runcmd | ||
with: | ||
arch: armv7 | ||
distro: ubuntu22.04 | ||
|
||
macos: | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
go-version: [1.22.x] # , 1.21.x, 1.20.x] | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: prerequisites # macos speicific | ||
run: brew install pkg-config check | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Test | ||
env: | ||
GO111MODULE: on | ||
run: go test -cover ./... | ||
- name: Build | ||
run: go build | ||
- name: Examples test | ||
run: make test all | ||
# Not required, but speeds up builds by storing container images in | ||
# a GitHub package registry. | ||
githubToken: ${{ github.token }} | ||
|
||
windows: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- { go-version: 1.22.x, sys: mingw64, env: x86_64 } | ||
defaults: | ||
run: | ||
shell: msys2 {0} | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: prerequisites # Windows speicific | ||
uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: ${{matrix.sys}} | ||
update: true | ||
install: base-devel git pkg-config mingw-w64-${{matrix.env}}-check mingw-w64-${{matrix.env}}-toolchain | ||
path-type: inherit # to be able to find go | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Test | ||
env: | ||
GO111MODULE: on | ||
run: go test -cover ./... | ||
- name: Build | ||
run: go build | ||
- name: Examples test | ||
run: make test all | ||
# Set an output parameter `uname` for use in subsequent steps | ||
run: | | ||
uname -a | ||
echo ::set-output name=uname::$(uname -a) | ||
- name: Get the output | ||
# Echo the `uname` output parameter from the `runcmd` step | ||
run: | | ||
echo "The uname output was ${{ steps.runcmd.outputs.uname }}" | ||
# ubuntu: | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# include: | ||
# - { go-version: 1.22.x, dwarf-version: 3} | ||
# - { go-version: 1.22.x, dwarf-version: 4} | ||
# - { go-version: 1.22.x, dwarf-version: 5} | ||
# steps: | ||
# - name: Install Go | ||
# uses: actions/setup-go@v3 | ||
# with: | ||
# go-version: ${{ matrix.go-version }} | ||
# - name: prerequisites # ubuntu speicific | ||
# run: sudo apt-get install check | ||
# - name: Checkout code | ||
# uses: actions/checkout@v3 | ||
# - name: Test | ||
# env: | ||
# GO111MODULE: on | ||
# run: go test -cover ./... | ||
# - name: Build | ||
# run: go build | ||
# - name: Examples test | ||
# run: make test all DWARF_VER_FORCE=${{matrix.dwarf-version}} | ||
|
||
# macos: | ||
# runs-on: macos-latest | ||
# strategy: | ||
# matrix: | ||
# go-version: [1.22.x] # , 1.21.x, 1.20.x] | ||
# steps: | ||
# - name: Install Go | ||
# uses: actions/setup-go@v3 | ||
# with: | ||
# go-version: ${{ matrix.go-version }} | ||
# - name: prerequisites # macos speicific | ||
# run: brew install pkg-config check | ||
# - name: Checkout code | ||
# uses: actions/checkout@v3 | ||
# - name: Test | ||
# env: | ||
# GO111MODULE: on | ||
# run: go test -cover ./... | ||
# - name: Build | ||
# run: go build | ||
# - name: Examples test | ||
# run: make test all | ||
|
||
# windows: | ||
# runs-on: windows-latest | ||
# strategy: | ||
# matrix: | ||
# include: | ||
# - { go-version: 1.22.x, sys: mingw64, env: x86_64 } | ||
# defaults: | ||
# run: | ||
# shell: msys2 {0} | ||
# steps: | ||
# - name: Install Go | ||
# uses: actions/setup-go@v3 | ||
# with: | ||
# go-version: ${{ matrix.go-version }} | ||
# - name: prerequisites # Windows speicific | ||
# uses: msys2/setup-msys2@v2 | ||
# with: | ||
# msystem: ${{matrix.sys}} | ||
# update: true | ||
# install: base-devel git pkg-config mingw-w64-${{matrix.env}}-check mingw-w64-${{matrix.env}}-toolchain | ||
# path-type: inherit # to be able to find go | ||
# - name: Checkout code | ||
# uses: actions/checkout@v3 | ||
# - name: Test | ||
# env: | ||
# GO111MODULE: on | ||
# run: go test -cover ./... | ||
# - name: Build | ||
# run: go build | ||
# - name: Examples test | ||
# run: make test all |