Skip to content

Plugins

Plugins #88

Workflow file for this run

# Copyright 2021 Jack Bister
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: ci
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Setup
uses: actions/setup-go@v4
with:
go-version: ^1.21
id: go
- name: Install Windows toolchain
run: sudo apt install gcc-mingw-w64
- name: Checkout
uses: actions/checkout@v2
- name: Build frontend
working-directory: ./internal/web/static
run: npm ci && npm run build
- name: Build
run: go build -v -ldflags "-X main.versionString=snapshot-$GITHUB_SHA" ./cmd/logsuck/main.go
- name: Build Windows
run: GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc go build -v -ldflags "-X main.versionString=snapshot-$GITHUB_SHA" ./cmd/logsuck/main.go
- name: Build Postgres
run: go build -tags postgres -v -ldflags "-X main.versionString=snapshot-$GITHUB_SHA" ./cmd/logsuck/main.go
- name: Test
run: go test -v ./...