Skip to content

Update README.md

Update README.md #4

Workflow file for this run

name: Build and Test
on:
push:
branches:
- main
pull_request:
jobs:
build:
name: Build and Test - ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
goos: linux
goarch: amd64
ext: ""
name: melodica-linux-x86_64
- os: windows-latest
goos: windows
goarch: amd64
ext: ".exe"
name: melodica-windows-x86_64.exe
- os: macos-latest
goos: darwin
goarch: arm64
ext: ""
name: melodica-darwin-arm64
build_supported: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
# Install audio dependencies for Linux
- name: Install dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install -y libasound2-dev
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.23.2"
# Separate build step for non-Windows OS
- name: Build binary (Non-Windows)
if: matrix.os != 'windows-latest'
run: |
mkdir -p dist
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o dist/${{ matrix.name }} ./cmd/melodica/main.go
# Separate build step for Windows
- name: Build binary (Windows)
if: matrix.os == 'windows-latest'
run: |
mkdir -p dist
go build -o dist/${{ matrix.name }} ./cmd/melodica/main.go
shell: pwsh
- name: Run tests
run: go test ./...