| 1 |
name: easyjson |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: [ master ] |
| 6 |
pull_request: |
| 7 |
branches: [ master ] |
| 8 |
|
| 9 |
jobs: |
| 10 |
test: |
| 11 |
runs-on: ubuntu-latest |
| 12 |
name: Test with Go ${{ matrix.go }} |
| 13 |
strategy: |
| 14 |
fail-fast: false |
| 15 |
matrix: |
| 16 |
go: [ 1.23 ] |
| 17 |
steps: |
| 18 |
- uses: actions/checkout@v2 |
| 19 |
|
| 20 |
- name: Set up Go ${{ matrix.go }} |
| 21 |
uses: actions/setup-go@v2 |
| 22 |
with: |
| 23 |
go-version: ${{ matrix.go }} |
| 24 |
|
| 25 |
- name: Install golint (for old go version) |
| 26 |
if: matrix.go < 1.16 |
| 27 |
run: go get golang.org/x/lint/golint && go mod tidy |
| 28 |
|
| 29 |
- name: Install golint |
| 30 |
if: matrix.go > 1.15 |
| 31 |
run: go install golang.org/x/lint/golint@latest |
| 32 |
|
| 33 |
- name: Build and Run tests |
| 34 |
run: make |
| 35 |
|
| 36 |
# test-arm64: |
| 37 |
# runs-on: ubuntu-latest |
| 38 |
# name: Test on ${{ matrix.distro }} ${{ matrix.arch }} |
| 39 |
# strategy: |
| 40 |
# matrix: |
| 41 |
# include: |
| 42 |
# - arch: arm64 |
| 43 |
# distro: ubuntu24.04 |
| 44 |
# steps: |
| 45 |
# - uses: actions/checkout@v2 |
| 46 |
# - uses: uraimo/run-on-arch-action@master |
| 47 |
# with: |
| 48 |
# arch: ${{ matrix.arch }} |
| 49 |
# distro: ${{ matrix.distro }} |
| 50 |
# install: | |
| 51 |
# apt-get update |
| 52 |
# apt install -y curl wget make gcc |
| 53 |
# latestGo=$(curl "https://golang.org/VERSION?m=text") |
| 54 |
# wget --quiet "https://dl.google.com/go/${latestGo}.linux-${{ matrix.arch }}.tar.gz" |
| 55 |
# rm -f $(which go) |
| 56 |
# rm -rf /usr/local/go |
| 57 |
# tar -C /usr/local -xzf "${latestGo}.linux-${{ matrix.arch }}.tar.gz" |
| 58 |
# run: | |
| 59 |
# export PATH=/usr/local/go/bin:$PATH |
| 60 |
# export PATH=~/go/bin:$PATH |
| 61 |
# printf "Go Version: $(go version)\n" |
| 62 |
# go install golang.org/x/lint/golint@latest |
| 63 |
# make |