mirror of
https://github.com/openlibrecommunity/olcrtc.git
synced 2026-05-26 07:08:11 +00:00
114 lines
2.7 KiB
YAML
114 lines
2.7 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main", "master" ]
|
|
pull_request:
|
|
branches: [ "main", "master" ]
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.25.x'
|
|
|
|
- name: golangci-lint
|
|
run: |
|
|
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
|
|
$(go env GOPATH)/bin/golangci-lint run --timeout=5m
|
|
|
|
build-cli:
|
|
name: Build CLI (Binaries)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.25.x'
|
|
|
|
- name: Install Mage
|
|
run: go install github.com/magefile/mage@latest
|
|
|
|
- name: Build CLI (Cross)
|
|
run: mage cross
|
|
|
|
- name: Upload CLI Artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: olcrtc-cli-binaries
|
|
path: build/
|
|
|
|
build-ui:
|
|
name: Build UI (${{ matrix.os }})
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.25.x'
|
|
|
|
- name: Install Linux Dependencies (Fyne)
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y gcc libgl1-mesa-dev xorg-dev libwayland-dev libx11-dev
|
|
|
|
- name: Install Mage
|
|
run: go install github.com/magefile/mage@latest
|
|
|
|
- name: Build UI
|
|
run: mage buildUI
|
|
|
|
- name: Upload UI Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: olcrtc-ui-${{ runner.os }}
|
|
path: build/
|
|
|
|
build-android:
|
|
name: Build Android (AAR)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.25.x'
|
|
|
|
- name: Set up JDK
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: '17'
|
|
|
|
- name: Install gomobile
|
|
run: |
|
|
go install golang.org/x/mobile/cmd/gomobile@latest
|
|
gomobile init
|
|
|
|
- name: Install Mage
|
|
run: go install github.com/magefile/mage@latest
|
|
|
|
- name: Build Mobile
|
|
run: mage mobile
|
|
|
|
- name: Upload Android Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: olcrtc-android
|
|
path: build/olcrtc.aar
|