Skip to content

Commit

Permalink
Add github actions (#43)
Browse files Browse the repository at this point in the history
* Add github actions
* More platforms
* Try upgrading goreleaser.
* Add badge
  • Loading branch information
klauspost authored Jan 28, 2022
1 parent 8b4698f commit b745a68
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 65 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Go

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]


jobs:
build:
strategy:
matrix:
go-version: [1.15.x, 1.16.x, 1.17.x,]
os: [ubuntu-latest, macos-latest, windows-latest]
env:
CGO_ENABLED: 0
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v2

- name: Vet
run: go vet ./...

- name: Test
run: go test ./...

- name: Test Race
env:
CGO_ENABLED: 1
run: go test -cpu="1,4" -short -race -v ./...

build-special:
env:
CGO_ENABLED: 0
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17.x

- name: Checkout code
uses: actions/checkout@v2

- name: fmt
run: diff <(gofmt -d .) <(printf "")

- name: Test 386
run: GOOS=linux GOARCH=386 go test ./...

- name: goreleaser deprecation
run: curl -sfL https://git.io/goreleaser | VERSION=v1.4.1 sh -s -- check

- name: goreleaser snapshot
run: curl -sL https://git.io/goreleaser | VERSION=v1.4.1 sh -s -- --snapshot --skip-publish --rm-dist

30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: goreleaser

on:
push:
tags:
- 'v*'

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17.x
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: 1.4.1
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CGO_ENABLED: 0
6 changes: 6 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ builds:
- CGO_ENABLED=0
flags:
- -ldflags=-s -w
- -trimpath
goos:
- aix
- linux
Expand All @@ -17,7 +18,12 @@ builds:
goarch:
- 386
- amd64
- arm
- arm64
- ppc64
- ppc64le
- mips64
- mips64le
goarm:
- 7

Expand Down
44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ This will format your assembler code in a similar way that `gofmt` formats your

Read Introduction: [asmfmt: Go Assembler Formatter](https://blog.klauspost.com/asmfmt-assembler-formatter/)

[![Build Status](https://travis-ci.com/klauspost/asmfmt.svg?branch=master)](https://travis-ci.com/klauspost/asmfmt)
[![Windows Build](https://ci.appveyor.com/api/projects/status/s729ayhkqkjf0ye6/branch/master?svg=true)](https://ci.appveyor.com/project/klauspost/asmfmt/branch/master)
[![Go Reference](https://pkg.go.dev/badge/klauspost/asmfmt.svg)](https://pkg.go.dev/klauspost/asmfmt)

[![Go](https://github.com/klauspost/asmfmt/actions/workflows/go.yml/badge.svg)](https://github.com/klauspost/asmfmt/actions/workflows/go.yml)

See [Example 1](https://files.klauspost.com/diff.html), [Example 2](https://files.klauspost.com/diff2.html), [Example 3](https://files.klauspost.com/diff3.html), or compare files in the [testdata folder](https://github.com/klauspost/asmfmt/tree/master/testdata).

Expand Down
18 changes: 0 additions & 18 deletions appveyor.yml

This file was deleted.

0 comments on commit b745a68

Please sign in to comment.