add build workflow for compiling the program

This commit is contained in:
LilliaElaine
2025-10-21 16:59:23 -04:00
parent fe9bd08933
commit f9a2303baf

View File

@ -5,24 +5,26 @@ name: Go
on: on:
push: push:
branches: [ "main" ] branches: ["main"]
pull_request: pull_request:
branches: [ "main" ] branches: ["main"]
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v4 uses: actions/setup-go@v4
with: with:
go-version: '1.24' go-version: "1.24"
- name: Build - name: install libusb
run: go build -v ./... run: sudo apt update && sudo apt install -y libusb-1.0-0-dev
- name: Test - name: Build
run: go test -v ./... run: go build -v ./...
- name: Test
run: go test -v ./...