[build] github action update (#4336)

* [ops] update github action files

* [ops] add debug message in github action

* [ops] fix GPG action variable

* [ops] fix macos-12 build

* [ops] fix macos-12 build

* [ops] fix macos-12 build

* [ops] fix macos-12 build

* [ops] fix macos-12 build

* [ops] fix macos-12 build
pull/4337/head
Soph 2 years ago committed by GitHub
parent e047f5f0cb
commit e1d443720d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 42
      .github/workflows/ci-tag.yaml
  2. 44
      .github/workflows/ci.yaml

@ -10,14 +10,14 @@ on:
jobs:
check:
name: Per-check for current tag
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
continue-on-error: false
outputs:
tag_annotated: ${{ steps.check-tag-annotated.outputs.tag_annotated }}
steps:
- name: Checkout harmony core code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: harmony
ref: ${{ github.event.inputs.tag }}
@ -42,40 +42,40 @@ jobs:
if: needs.check.outputs.tag_annotated == 'true'
strategy:
matrix:
os: [ubuntu-18.04, macos-10.15, [self-hosted, linux, ARM64]]
os: [ubuntu-22.04, macos-12, [self-hosted, linux, ARM64]]
steps:
- name: Import GPG key
if: join(matrix.os, '-') != 'self-hosted-linux-ARM64'
uses: crazy-max/ghaction-import-gpg@v3
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASS }}
- name: Set up Go 1.14
uses: actions/setup-go@v2
with:
go-version: 1.14.14
- name: Checkout dependence repo
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: harmony-one/mcl
path: mcl
- name: Checkout dependence repo
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: harmony-one/bls
path: bls
- name: Checkout harmony core code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: harmony
ref: ${{ github.event.inputs.tag }}
fetch-depth: 0
- name: Set up Go go.mod
uses: actions/setup-go@v3
with:
go-version-file: 'harmony/go.mod'
- name: Get latest version and release
run: |
VERSION=$(git tag -l --sort=-v:refname | head -n 1 | tr -d v)
@ -85,7 +85,7 @@ jobs:
working-directory: harmony
- name: Build harmony binary and packages for Linux
if: matrix.os == 'ubuntu-18.04'
if: matrix.os == 'ubuntu-22.04'
run: |
make linux_static
make deb
@ -104,7 +104,7 @@ jobs:
working-directory: harmony
- name: Build harmony binary and packages for MacOS
if: matrix.os == 'macos-10.15'
if: matrix.os == 'macos-12'
run: |
brew install bash
sudo rm -f /usr/local/opt/openssl
@ -126,12 +126,12 @@ jobs:
docker-build:
name: Build and push harmony docker image
needs: [check, build]
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
if: needs.check.outputs.tag_annotated == 'true'
steps:
- name: Checkout harmony core code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: harmony
ref: ${{ github.event.inputs.tag }}
@ -177,18 +177,18 @@ jobs:
release-page:
name: Sign binary and create and publish release page
needs: [check, build]
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
if: needs.check.outputs.tag_annotated == 'true'
steps:
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v3
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASS }}
- name: Checkout harmony core code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: harmony
ref: ${{ github.event.inputs.tag }}

@ -8,14 +8,14 @@ on:
jobs:
check:
name: Per-check for current tag
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
continue-on-error: false
outputs:
tag_annotated: ${{ steps.check-tag-annotated.outputs.tag_annotated }}
steps:
- name: Checkout harmony core code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: harmony
ref: ${{ github.ref }}
@ -40,40 +40,40 @@ jobs:
if: needs.check.outputs.tag_annotated == 'true'
strategy:
matrix:
os: [ubuntu-18.04, macos-12, [self-hosted, linux, ARM64]]
os: [ubuntu-22.04, macos-12, [self-hosted, linux, ARM64]]
steps:
- name: Import GPG key
if: join(matrix.os, '-') != 'self-hosted-linux-ARM64'
uses: crazy-max/ghaction-import-gpg@v3
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASS }}
- name: Set up Go 1.18
uses: actions/setup-go@v2
with:
go-version: 1.18.4
- name: Checkout dependence repo
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: harmony-one/mcl
path: mcl
- name: Checkout dependence repo
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: harmony-one/bls
path: bls
- name: Checkout harmony core code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: harmony
ref: ${{ github.ref }}
fetch-depth: 0
- name: Set up Go with go.mod
uses: actions/setup-go@v3
with:
go-version-file: 'harmony/go.mod'
- name: Get latest version and release
run: |
VERSION=$(git tag -l --sort=-v:refname | head -n 1 | tr -d v)
@ -83,7 +83,7 @@ jobs:
working-directory: harmony
- name: Build harmony binary and packages for Linux
if: matrix.os == 'ubuntu-18.04'
if: matrix.os == 'ubuntu-22.04'
run: |
make linux_static
make deb
@ -107,6 +107,10 @@ jobs:
brew install bash
sudo rm -f /usr/local/opt/openssl
sudo ln -sf /usr/local/opt/openssl@1.1 /usr/local/opt/openssl
# hack for older chip (macos)
sudo mkdir -p /opt/homebrew/opt
sudo ln -sf /usr/local/opt/openssl@1.1 /opt/homebrew/opt/openssl@1.1
sudo ln -sf /usr/local/opt/gmp /opt/homebrew/opt/gmp
make
cd ./bin && mkdir ./lib && mv ./*.dylib ./lib && rm -f ./bootnode
gpg --detach-sign harmony
@ -124,12 +128,12 @@ jobs:
docker-build:
name: Build and push harmony docker image
needs: [check, build]
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
if: needs.check.outputs.tag_annotated == 'true'
steps:
- name: Checkout harmony core code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: harmony
ref: ${{ github.ref }}
@ -175,18 +179,18 @@ jobs:
release-page:
name: Sign binary and create and publish release page
needs: [check, build]
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
if: needs.check.outputs.tag_annotated == 'true'
steps:
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v3
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASS }}
- name: Checkout harmony core code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: harmony
ref: ${{ github.ref }}

Loading…
Cancel
Save