Skip to content

Commit

Permalink
Merge pull request #16 from eosnetworkfoundation/gh-15-conan-install-…
Browse files Browse the repository at this point in the history
…cicd-quick-fix

Get EOS EVM Node Build job to succeed
  • Loading branch information
oschwaldp-oci authored Jul 28, 2023
2 parents fb28c34 + 07743bb commit 4331808
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .cicd/platforms.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ubuntu22": {
"dockerfile": ".cicd/platforms/ubuntu22.Dockerfile"
}
}
11 changes: 11 additions & 0 deletions .cicd/platforms/ubuntu22.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM ubuntu:jammy
ENV TZ="America/New_York"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y build-essential \
cmake \
gcc-11 \
g++-11 \
git \
python3-pip
RUN pip install -v "conan==1.60.2"
5 changes: 0 additions & 5 deletions .github/workflows/build-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ function ee()
eval "$@"
}

# install dependencies for self-hosted runners
ee export DEBIAN_FRONTEND='noninteractive'
ee sudo apt-get update -q
ee sudo apt-get install -yqq cmake gcc-10 g++-10

# debug code
echo "CC='${CC}'"
echo "CXX='${CXX}'"
Expand Down
54 changes: 51 additions & 3 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,57 @@ jobs:
- name: Attach Documentation
run: cat .github/workflows/node.md >> $GITHUB_STEP_SUMMARY

d:
name: Discover Platforms
runs-on: ubuntu-latest
outputs:
missing-platforms: ${{steps.discover.outputs.missing-platforms}}
p: ${{steps.discover.outputs.platforms}}
steps:
- name: Discover Platforms
id: discover
uses: AntelopeIO/discover-platforms-action@v1
with:
platform-file: .cicd/platforms.json
password: ${{secrets.GITHUB_TOKEN}}
package-name: builders

build-platforms:
name: Build Platforms
needs: d
if: needs.d.outputs.missing-platforms != '[]'
strategy:
fail-fast: false
matrix:
platform: ${{fromJSON(needs.d.outputs.missing-platforms)}}
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Login to Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{github.repository_owner}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}}
file: ${{fromJSON(needs.d.outputs.p)[matrix.platform].dockerfile}}

build:
name: EOS EVM Node Build
runs-on: ubuntu-20.04
needs: [d, build-platforms]
if: always() && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped')
strategy:
fail-fast: false
matrix:
platform: [ ubuntu22 ]
runs-on: ubuntu-latest
container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}}

steps:
- name: Authenticate
Expand All @@ -53,8 +101,8 @@ jobs:
- name: Build EOS EVM Node
run: .github/workflows/build-node.sh
env:
CC: gcc-10
CXX: g++-10
CC: gcc-11
CXX: g++-11

- name: Upload Artifacts
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 4331808

Please sign in to comment.