Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[infra/github] Intrdocue docker build workflow #14536

Merged
merged 2 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/build-dev-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build docker image for CI/CD infra
on:
push:
branches:
- master
- release/*
paths:
- '.github/workflows/build-dev-docker.yml'
- 'infra/docker/**'
pull_request:
branches:
- master
- release/*
paths:
- '.github/workflows/build-dev-docker.yml'
- 'infra/docker/**'

jobs:
# Build on docker CLI for PR test without login
build-pr-test:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
strategy:
matrix:
version: [ 'android-sdk', 'focal', 'jammy', 'noble' ]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build Docker Image
run: |
./nnas build-docker-image --codename ${{ matrix.version }} --tag one-test

- name: Test onert build
if: matrix.version != 'android-sdk'
env:
DOCKER_IMAGE_NAME: one-test
run: |
./nnas docker-run --user make -f Makefile.template
./nnas docker-run --user Product/out/test/onert-test unittest

# Use github action for build and push to docker hub
build-docker-image:
if: github.event_name == 'push' && github.repository_owner == 'Samsung'
runs-on: ubuntu-latest
strategy:
matrix:
version: [ 'android-sdk', 'focal', 'jammy', 'noble' ]
steps:
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Install Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Docker Image
uses: docker/build-push-action@v6
with:
file: ./infra/docker/${{ matrix.version }}/Dockerfile
push: true
tags: nnfw/one-devtools:${{ matrix.version }}
3 changes: 3 additions & 0 deletions infra/docker/focal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ FROM ubuntu:20.04
# Install 'add-apt-repository'
RUN apt-get update && apt-get -qqy install software-properties-common

# Install tzdata without user input
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -qqy install tzdata

# Build tool
RUN apt-get update && apt-get -qqy install build-essential cmake scons git lcov g++-arm-linux-gnueabihf g++-aarch64-linux-gnu

Expand Down
3 changes: 3 additions & 0 deletions infra/docker/jammy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ FROM ubuntu:jammy
# Install 'add-apt-repository'
RUN apt-get update && apt-get -qqy install software-properties-common

# Install tzdata without user input
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -qqy install tzdata

# Build tool
RUN apt-get update && apt-get -qqy install build-essential cmake scons git lcov g++-arm-linux-gnueabihf g++-aarch64-linux-gnu

Expand Down
2 changes: 1 addition & 1 deletion infra/docker/noble/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN apt-get update && apt-get -qqy install libboost-all-dev libgflags-dev libgoo
# Additonal tools
RUN apt-get update && \
apt-get -qqy install doxygen graphviz wget zip unzip python3 python3-pip python3-venv python3-dev hdf5-tools curl
RUN python3 -m pip install yapf==0.40.2 pylint --break-system-packages
RUN python3 -m pip install yapf==0.40.2 pylint numpy flatbuffers --break-system-packages

# Install clang-format
RUN apt-get update && apt-get -qqy install clang-format-16
Expand Down
Loading