diff --git a/.github/workflows/build-dev-docker.yml b/.github/workflows/build-dev-docker.yml new file mode 100644 index 00000000000..764293be73b --- /dev/null +++ b/.github/workflows/build-dev-docker.yml @@ -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 }} diff --git a/infra/docker/focal/Dockerfile b/infra/docker/focal/Dockerfile index 0e2ab4e3f23..58e28d24382 100644 --- a/infra/docker/focal/Dockerfile +++ b/infra/docker/focal/Dockerfile @@ -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 diff --git a/infra/docker/jammy/Dockerfile b/infra/docker/jammy/Dockerfile index 2d55083e365..0ce364ee872 100644 --- a/infra/docker/jammy/Dockerfile +++ b/infra/docker/jammy/Dockerfile @@ -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 diff --git a/infra/docker/noble/Dockerfile b/infra/docker/noble/Dockerfile index 4839211b3d7..ea5415eeac1 100644 --- a/infra/docker/noble/Dockerfile +++ b/infra/docker/noble/Dockerfile @@ -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