Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

update golang version in arm #196

update golang version in arm

update golang version in arm #196

Workflow file for this run

on:
push:
pull_request:
name: build
jobs:
build_amd64:
name: build on ubuntu-22.04 amd64
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up golang
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install bats golang make openssl swtpm tpm2-tools \
libcryptsetup-dev libgpgme-dev libcap-dev qemu-kvm \
libdevmapper-dev libacl1-dev libarchive-tools pip squashfs-tools \
sbsigntool
pip install virt-firmware
- name: build
run: |
make
- name: test
run: |
make test
- name: Rename Binary
run: |
mv trust trust-linux-amd64
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: trust-linux-amd64
build_arm64:
runs-on: ubuntu-latest
name: Build on ubuntu-latest arm64
steps:
- uses: actions/checkout@v3
- uses: uraimo/run-on-arch-action@v2
with:
arch: aarch64
distro: ubuntu22.04
githubToken: ${{ github.token }}
install: |
apt-get -y update;
apt-get install -q -y git golang-go;
apt-get install -y bats golang make openssl swtpm tpm2-tools \
libcryptsetup-dev libgpgme-dev libcap-dev qemu-kvm \
libdevmapper-dev libacl1-dev libarchive-tools pip squashfs-tools \
sbsigntool wget
pip install virt-firmware
mv /usr/lib/go /usr/lib/go.no || true
cd /tmp/
wget https://go.dev/dl/go1.21.0.linux-arm64.tar.gz
tar -C /usr/lib -zvxf go1.21.0.linux-arm64.tar.gz
rm /usr/bin/go /usr/bin/gofmt
ln -s /usr/lib/go/bin/go /usr/bin/go
ln -s /usr/lib/go/bin/gofmt /usr/bin/gofmt
run: |
git config --global --add safe.directory /home/runner/work/trust/trust
pwd
git describe --always --dirty
go version
make
make test
- name: Rename Binary
run: |
mv trust trust-linux-arm64
- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: trust-linux-arm64