build #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "build" | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
name: "Build Calculator (${{ matrix.target.os }}, ${{ matrix.go-version }})" | ||
runs-on: ${{ matrix.target.host || 'ubuntu-latest' }} | ||
env: | ||
GO111MODULE: on | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# use max/min supported Go versions | ||
go-version: ["1.21.x"] | ||
target: | ||
- os: linux | ||
- os: windows | ||
ext: .exe | ||
# - os: freebsd | ||
- os: android | ||
args: -app-id calc.sha${{ github.sha }} | ||
## Not shared darwin image is available at the moment | ||
# - os: darwin | ||
# args: -app-id calc.sha${{ github.sha }} | ||
# host: macos-latest | ||
- os: web | ||
## Currently not easily supported from GitHub actions. | ||
## https://github.com/fyne-io/fyne-cross/pull/104#issuecomment-1099494308 | ||
# - os: ios | ||
# args: -app-id calc.sha${{ github.sha }} | ||
# host: macos-latest | ||
steps: | ||
- name: Setup Go environment | ||
id: setup-go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
path: fyne-cross | ||
- name: Checkout fyne-io/calculator | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: fyne-io/calculator | ||
path: calculator | ||
- name: Cache build artifacts | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
~/.cache/fyne-cross | ||
key: ${{ runner.os }}-build-cache-${{ hashFiles('**/go.sum') }} | ||
- name: Install Fyne-cross | ||
working-directory: fyne-cross | ||
run: go install github.com/fyne-io/fyne-cross@latest | ||
# attempt to use "go install" but fallback to "go get" | ||
- name: Install Fyne | ||
run: | | ||
go install fyne.io/fyne/v2/cmd/fyne@latest || | ||
go get fyne.io/fyne/v2/cmd/fyne@latest | ||
- name: Install Podman | ||
if: ${{ runner.os == 'macos' }} | ||
run: | | ||
brew install podman | ||
podman machine init | ||
podman machine start | ||
- name: Build | ||
working-directory: calculator | ||
run: | | ||
fyne-cross \ | ||
${{ matrix.target.os }} \ | ||
${{ matrix.target.args }} \ | ||
-debug -no-cache \ | ||
-name calculator${{ matrix.target.ext }} | ||
- name: Upload Artifact | ||
working-directory: calculator | ||
uses: actions/upload-artifact@v3 | ||
Check failure on line 90 in .github/workflows/build.yml GitHub Actions / buildInvalid workflow file
|
||
with: | ||
name: Artifact-${{ matrix.target.ext }} | ||
path: fyne-cross/dist/* |