Bump to Go v1.22.x #30
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: Go-Ubiq GitHub Actions Release Builder | |
env: | |
BUILD_TAG: v7.0.1 | |
GO_VERSION: 1.22.x | |
on: | |
push: | |
jobs: | |
build-linux: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out ubiq/go-ubiq | |
uses: actions/checkout@v2 | |
with: | |
repository: ubiq/go-ubiq | |
ref: ${{ env.BUILD_TAG }} | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Build AMD64 | |
run: | | |
go run build/ci.go install ./cmd/gubiq | |
mv build/bin/gubiq build/bin/gubiq-linux-amd64 | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: gubiq-linux-amd64 | |
path: build/bin/gubiq-linux-amd64 | |
- name: Install ARM dependencies | |
# ARM dependencies | |
# Switch over GCC to cross compilation (breaks 386, hence why do it here only) | |
run: | | |
sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install gcc-arm-linux-gnueabi libc6-dev-armel-cross gcc-arm-linux-gnueabihf libc6-dev-armhf-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross | |
sudo ln -s /usr/include/asm-generic /usr/include/asm | |
- name: Build ARM7 | |
run: | | |
GOARM=7 go run build/ci.go install -arch arm -cc arm-linux-gnueabihf-gcc ./cmd/gubiq | |
mv -v build/bin/gubiq build/bin/gubiq-linux-arm7 | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: gubiq-linux-arm7 | |
path: build/bin/gubiq-linux-arm7 | |
- name: Build ARM64 | |
run: | | |
go run build/ci.go install -arch arm64 -cc aarch64-linux-gnu-gcc ./cmd/gubiq | |
mv -v build/bin/gubiq build/bin/gubiq-linux-arm64 | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: gubiq-linux-arm64 | |
path: build/bin/gubiq-linux-arm64 | |
build-mac: | |
runs-on: macOS-10.15 | |
steps: | |
- name: Check out ubiq/go-ubiq | |
uses: actions/checkout@v2 | |
with: | |
repository: ubiq/go-ubiq | |
ref: ${{ env.BUILD_TAG }} | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Build | |
run: | | |
go run build/ci.go install ./cmd/gubiq | |
mv build/bin/gubiq build/bin/gubiq-darwin-amd64 | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: gubiq-darwin-amd64 | |
path: build/bin/gubiq-darwin-amd64 | |
build-windows: | |
runs-on: windows-2019 | |
steps: | |
- name: Check out ubiq/go-ubiq | |
uses: actions/checkout@v2 | |
with: | |
repository: ubiq/go-ubiq | |
ref: ${{ env.BUILD_TAG }} | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Install MSYS | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: mingw64 | |
install: mingw-w64-x86_64-gcc | |
- name: Build | |
run: | | |
$Env:MSYS2_ROOT = msys2 -c 'cygpath -m /' | |
$Env:PATH += ";$Env:MSYS2_ROOT/mingw64/bin" | |
go run build/ci.go install -arch amd64 -cc $Env:MSYS2_ROOT/mingw64/bin/gcc.exe ./cmd/gubiq | |
mv build/bin/gubiq.exe build/bin/gubiq-windows-amd64.exe | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: gubiq-windows-amd64.exe | |
path: build/bin/gubiq-windows-amd64.exe |