added github workflow
This commit is contained in:
59
.github/workflows/build.yml
vendored
Normal file
59
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, master ]
|
||||
pull_request:
|
||||
branches: [ main, master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.24.3'
|
||||
|
||||
- name: Install Fyne dependencies
|
||||
run: |
|
||||
# Install required system dependencies for Fyne
|
||||
brew install pkg-config
|
||||
|
||||
- name: Install Fyne CLI
|
||||
run: go install fyne.io/fyne/v2/cmd/fyne@latest
|
||||
|
||||
- name: Cache Go modules
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
|
||||
- name: Download dependencies
|
||||
run: go mod download
|
||||
|
||||
- name: Verify dependencies
|
||||
run: go mod verify
|
||||
|
||||
- name: Run tests
|
||||
run: go test -v ./...
|
||||
|
||||
- name: Build application
|
||||
run: make build
|
||||
|
||||
- name: Verify build output
|
||||
run: |
|
||||
ls -la TurtleSilicon.app/
|
||||
ls -la TurtleSilicon.app/Contents/Resources/
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: TurtleSilicon-macos
|
||||
path: TurtleSilicon.app/
|
||||
retention-days: 30
|
Reference in New Issue
Block a user