Skip to content

Build Binaries

Build Binaries #90

Workflow file for this run

name: Build Binaries
on:
push:
branch:
- fix_build
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
goos: linux
goarch: amd64
cctarget: x86_64-linux-gnu
- os: ubuntu-latest
goos: linux
goarch: arm64
cctarget: aarch64-linux-gnu
- os: ubuntu-latest
goos: windows
goarch: amd64
cctarget: x86_64-windows-gnu
- os: macos-latest
goos: darwin
goarch: amd64
cctarget: x86_64-apple-darwin
go-version: ['1.20.3']
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install UPX (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y upx-ucl
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Install C cross compiler (Ubuntu)
if: matrix.os == 'ubuntu-latest'
uses: goto-bus-stop/setup-zig@v2
- name: Build Juno
run: |
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} CGO_ENABLED=1 CC="zig cc -target ${{ matrix.cctarget }} -Wno-macro-redefined" make juno
if [[ ${{ matrix.goos }} == "linux" ]]; then
upx build/juno
fi
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: juno-${{ matrix.goos }}-${{ matrix.goarch }}
path: build/juno