mirror of
https://github.com/emqx/neuron.git
synced 2026-10-17 04:40:42 +08:00
ci: del docker image build
This commit is contained in:
@@ -1,52 +0,0 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
RUN apt-get update -y \
|
||||
&& apt-get install -y curl wget vim unzip make ninja-build \
|
||||
g++ gcc gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu \
|
||||
libssl-dev libghc-zlib-dev libcurl4-gnutls-dev libexpat1-dev gettext \
|
||||
pkg-config \
|
||||
python3 python3-pip \
|
||||
mosquitto rsyslog
|
||||
|
||||
RUN echo "if \$programname contains 'neuron' then /var/log/neuron.log" > /etc/rsyslog.d/neuron.conf \
|
||||
&& install -m 0640 -o syslog -g adm /dev/null /var/log/neuron.log
|
||||
|
||||
COPY install-libs.sh install-libs.sh
|
||||
|
||||
RUN echo "Building git (v2.18.0)" \
|
||||
&& curl --silent --show-error -kfL -o git.zip https://github.com/git/git/archive/v2.18.0.zip \
|
||||
&& unzip git.zip \
|
||||
&& cd git-* \
|
||||
&& make prefix=/usr/local all \
|
||||
&& make prefix=/usr/local install
|
||||
|
||||
RUN echo "Building cmake (v3.18.5)" \
|
||||
&& curl --silent --show-error -kfL -o cmake.tar.gz "https://github.com/Kitware/CMake/releases/download/v3.18.5/cmake-3.18.5.tar.gz" \
|
||||
&& tar -zxf cmake.tar.gz \
|
||||
&& rm -f cmake.tar.gz \
|
||||
&& cd "cmake-3.18.5/" \
|
||||
&& ./bootstrap --parallel=8 \
|
||||
&& make -j8 \
|
||||
&& make install \
|
||||
&& cd .. \
|
||||
&& cmake --version
|
||||
|
||||
RUN echo "Building googletest (v1.11.0)" \
|
||||
&& apt-get -y install libgtest-dev \
|
||||
&& cd /usr/src/gtest \
|
||||
&& rm -rf build \
|
||||
&& mkdir build \
|
||||
&& cd build \
|
||||
&& cmake -G Ninja .. \
|
||||
&& ninja \
|
||||
&& cp *.a /usr/local/lib \
|
||||
&& cd ..
|
||||
|
||||
RUN ./install-libs.sh -a
|
||||
RUN ./install-libs.sh -a -c -p aarch64-linux-gnu -s aarch64
|
||||
RUN ./install-libs.sh -a -c -p arm-linux-gnueabihf -s armv4
|
||||
|
||||
RUN apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
RUN ldconfig
|
||||
@@ -1,58 +0,0 @@
|
||||
name: Build docker base image
|
||||
|
||||
concurrency:
|
||||
group: base-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
## Update the base image every day
|
||||
on:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
schedule:
|
||||
## In UTC
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
## Build base images to be used by other github workflows
|
||||
jobs:
|
||||
base-image:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/.docker-buildx-cache
|
||||
key: docker-buildx
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ github.token }}
|
||||
- uses: docker/metadata-action@v3
|
||||
id: meta
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository }}/base
|
||||
flavor: |
|
||||
latest=true
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=tag
|
||||
type=semver,pattern={{version}}
|
||||
- name: Build base image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
pull: true
|
||||
cache-from: type=local,src=/tmp/.docker-buildx-cache,mode=max
|
||||
cache-to: type=local,dest=/tmp/.docker-buildx-cache-new,mode=max
|
||||
platforms: linux/amd64
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
file: .github/dockerfile/Dockerfile
|
||||
context: .
|
||||
- name: Update cache
|
||||
run: |
|
||||
rm -rf /tmp/.docker-buildx-cache
|
||||
mv /tmp/.docker-buildx-cache-new /tmp/.docker-buildx-cache
|
||||
Reference in New Issue
Block a user