Create build-linux.yml

This commit is contained in:
Evan Su 2024-06-19 22:13:01 -04:00 committed by GitHub
parent 135d71bfaf
commit 12a614a9bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

51
.github/workflows/build-linux.yml vendored Normal file
View file

@ -0,0 +1,51 @@
name: build-linux
on:
push:
paths:
- "src/*.go"
- "src/go.mod"
- "src/go.sum"
branches:
- main
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '>1.18'
check-latest: true
cache: false
- name: Install packages
run: |
sudo apt install -y gcc xorg-dev libgtk-3-dev libgl1-mesa-dev libglu1-mesa
- name: Install dependencies
run: |
cd src
go mod download
- name: Build
run: |
cd src
go build -v -ldflags="-s -w" -o Picocrypt.go
env:
CGO_ENABLED: 1
GOAMD64: v2
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: build-linux
path: src/Picocrypt
if-no-files-found: error
compression-level: 9