Skip to content

Commit

Permalink
More parallel builds
Browse files Browse the repository at this point in the history
  • Loading branch information
blaubaer committed Aug 24, 2024
1 parent 1b30ca3 commit 5cad77c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 10 deletions.
49 changes: 39 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
go-version: stable

- name: Install Ubuntu dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt install libpam0g-dev

- name: Checkout code
Expand All @@ -39,14 +40,49 @@ jobs:
- name: Install goveralls
run: go install github.com/mattn/goveralls@latest

- name: Install Syft
uses: anchore/sbom-action/download-syft@v0.17.2

- name: Test
run: |
mkdir -p var
go test -v -covermode atomic "-coverprofile=var/profile.cov" ./...
- name: Send coverage
if: false
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
goveralls "-coverprofile=profile.cov" "-service=github" "-parallel" "-flagname=go-${{ matrix.os }}"
package:
name: Package
strategy:
matrix:
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: stable

- name: Install Ubuntu dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt install libpam0g-dev

- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Cache
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install Syft
uses: anchore/sbom-action/download-syft@v0.17.2

- name: GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
Expand All @@ -55,10 +91,3 @@ jobs:
args: build --snapshot --clean
env:
BIFROEST_VENDOR: engity

- name: Send coverage
if: false
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
goveralls "-coverprofile=profile.cov" "-service=github" "-parallel" "-flagname=go-${{ matrix.os }}"
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
run:
timeout: 20m
build-tags:
- without-pam
- without-yescrypt

linters:
enable:
Expand Down
1 change: 1 addition & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ builds:
binary: bifroest
goos:
- linux
- windows
env:
- CGO_ENABLED=0
goarch:
Expand Down

0 comments on commit 5cad77c

Please sign in to comment.