Skip to content

Commit

Permalink
Try building up from base docker image.
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwaldp-oci committed Jul 28, 2023
1 parent 3c594f8 commit 16f9e6f
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .cicd/platforms.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ubuntu20": {
"dockerfile": ".cicd/platforms/ubuntu20.Dockerfile"
}
}

10 changes: 10 additions & 0 deletions .cicd/platforms/ubuntu20.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM ubuntu:focal
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-10 \
g++-10 \
git
RUN pip install -v "conan==1.60.2"
9 changes: 4 additions & 5 deletions .github/workflows/build-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ function ee()
}

# install dependencies for self-hosted runners
ee export DEBIAN_FRONTEND='noninteractive'
ee sudo apt-get update -q
ee sudo apt-get upgrade -y
ee sudo apt-get install -yqq cmake gcc-10 g++-10
ee sudo pip install -v "conan==1.60.2"
# ee export DEBIAN_FRONTEND='noninteractive'
# ee sudo apt-get update -q
# ee sudo apt-get install -yqq cmake gcc-10 g++-10
# ee sudo pip install -v "conan==1.60.2"

# debug code
echo "CC='${CC}'"
Expand Down
50 changes: 49 additions & 1 deletion .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: ["self-hosted", "enf-x86-beefy"]
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: [ ubuntu20 ]
runs-on: ubuntu-latest
container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}}

steps:
- name: Authenticate
Expand Down

0 comments on commit 16f9e6f

Please sign in to comment.