Skip to content

core: make qemu an optional dependency #640

core: make qemu an optional dependency

core: make qemu an optional dependency #640

Workflow file for this run

name: Go
on:
push:
tags: ["v*"]
paths-ignore:
- "**/*.md"
- "**/*.nix"
- "**/*.lock"
pull_request:
branches: [main]
paths-ignore:
- "**/*.md"
- "**/*.nix"
- "**/*.lock"
permissions: write-all
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
build-macos:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
binaries-linux:
needs: "build-linux"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: install gcc-aarch64-linux-gnu
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
- name: generate binaries
run: |
OS=Linux ARCH=x86_64 make
OS=Linux ARCH=aarch64 make
- name: upload artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts-linux
path: _output/binaries/
binaries-macos:
needs: "build-macos"
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: generate binaries
run: |
CGO_ENABLED=1 OS=Darwin ARCH=x86_64 make
CGO_ENABLED=1 OS=Darwin ARCH=arm64 make
- name: upload artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts-macos
path: _output/binaries/
release:
needs: ["binaries-linux", "binaries-macos"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: artifacts-linux
path: _output/binaries/
- uses: actions/download-artifact@v3
with:
name: artifacts-macos
path: _output/binaries/
- name: create release
if: github.event_name != 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >
tag="${GITHUB_REF##*/}"
gh release create "${tag}" --draft --title "${tag}"
_output/binaries/colima-Darwin-x86_64
_output/binaries/colima-Darwin-x86_64.sha256sum
_output/binaries/colima-Darwin-arm64
_output/binaries/colima-Darwin-arm64.sha256sum
_output/binaries/colima-Linux-x86_64
_output/binaries/colima-Linux-x86_64.sha256sum
_output/binaries/colima-Linux-aarch64
_output/binaries/colima-Linux-aarch64.sha256sum