upgrade go to version 1.22.5 (#304) #17
Workflow file for this run
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: test build | |
on: | |
push: | |
env: | |
GOPATH: ${{ github.workspace }} | |
GOBIN: ${{ github.workspace }}/bin | |
jobs: | |
build-x86_64: | |
name: Build hmy binary for x86_64 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-22.04, macos-latest ] | |
steps: | |
- name: Checkout hmy code | |
uses: actions/checkout@v3 | |
with: | |
path: go-sdk | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: go-sdk/go.mod | |
- name: Checkout dependence repo | |
uses: actions/checkout@v3 | |
with: | |
repository: harmony-one/mcl | |
path: ${{ github.workspace }}/src/github.com/harmony-one/mcl | |
- name: Checkout dependence repo | |
uses: actions/checkout@v3 | |
with: | |
repository: harmony-one/bls | |
path: ${{ github.workspace }}/src/github.com/harmony-one/bls | |
- name: Checkout dependence code | |
uses: actions/checkout@v2 | |
with: | |
repository: harmony-one/harmony | |
path: ${{ github.workspace }}/src/github.com/harmony-one/harmony | |
ref: main | |
fetch-depth: 0 | |
- name: Get latest version and release | |
run: | | |
VERSION=$(git tag -l --sort=-v:refname | head -n 1 | tr -d v) | |
RELEASE=$(git describe --long | cut -f2 -d-) | |
echo "build_version=$VERSION" >> $GITHUB_ENV | |
echo "build_release=$RELEASE" >> $GITHUB_ENV | |
working-directory: go-sdk | |
- name: Debug | |
run: | | |
pwd | |
echo ${HOME} | |
echo ${GITHUB_WORKSPACE} | |
echo ${GOPATH} | |
echo ${GOROOT} | |
ls ${{ github.workspace }}/src/github.com/harmony-one/ | |
- name: Build hmy binary for linux ubuntu | |
if: matrix.os == 'ubuntu-22.04' | |
run: | | |
make static | |
working-directory: go-sdk | |
- name: Build libs for macos-latest | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew install gmp | |
brew install openssl | |
sudo mkdir -p /opt/homebrew/opt/ | |
sudo ln -sf /usr/local/opt/[email protected] /opt/homebrew/opt/[email protected] | |
echo "ls -l /opt/homebrew/opt/[email protected]"; ls -l /opt/homebrew/opt/[email protected] | |
make libs | |
working-directory: ${{ github.workspace }}/src/github.com/harmony-one/harmony | |
- name: Build hmy binary for macos-latest x86_64 | |
if: matrix.os == 'macos-latest' | |
run: | | |
make all | |
working-directory: go-sdk | |
- name: Upload artifact for linux | |
uses: actions/upload-artifact@v3 | |
if: matrix.os == 'ubuntu-22.04' | |
with: | |
name: hmy-linux | |
path: ${{ github.workspace }}/go-sdk/dist/* | |
retention-days: 1 | |
- name: Upload artifact for darwin | |
uses: actions/upload-artifact@v3 | |
if: matrix.os == 'macos-latest' | |
with: | |
name: hmy-darwin | |
path: ${{ github.workspace }}/go-sdk/dist/* | |
retention-days: 1 |