mirror of https://github.com/openwrt/docker.git
ci: add smoke testing of SDK and IB containers
Currently we happily accept changes, which might break SDK and/or IB containers. So lets try to minimize the regressions by adding a smoke test before pushing the container. References: #164 Link: https://github.com/openwrt/docker/pull/165 Signed-off-by: Petr Štetiar <ynezz@true.cz>pull/165/head
parent
e8012cce6a
commit
cda8065dc5
|
|
@ -194,11 +194,35 @@ jobs:
|
||||||
${{ matrix.target }},enable=${{ needs.generate_matrix.outputs.version == 'SNAPSHOT' }}
|
${{ matrix.target }},enable=${{ needs.generate_matrix.outputs.version == 'SNAPSHOT' }}
|
||||||
latest,enable=${{ needs.generate_matrix.outputs.version == 'SNAPSHOT' && matrix.target == 'x86/64'}}
|
latest,enable=${{ needs.generate_matrix.outputs.version == 'SNAPSHOT' && matrix.target == 'x86/64'}}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build
|
||||||
|
id: build
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
no-cache: true
|
||||||
|
push: false
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
build-args: |
|
||||||
|
DOWNLOAD_FILE=imagebuilder-.*x86_64.tar.[xz|zst]
|
||||||
|
VERSION_PATH=${{ needs.generate_matrix.outputs.version_path }}
|
||||||
|
TARGET=${{ matrix.target }}
|
||||||
|
FILE_HOST=${{ needs.generate_matrix.outputs.file_host }}
|
||||||
|
RUN_SETUP=${{ needs.generate_matrix.outputs.run_setup }}
|
||||||
|
|
||||||
|
- name: Smoke test
|
||||||
|
run: |
|
||||||
|
docker run ${{ steps.build.outputs.imageid }} \
|
||||||
|
bash -c ' \
|
||||||
|
cd $HOME && \
|
||||||
|
bash setup.sh && \
|
||||||
|
make image PACKAGES=coreutils-echo \
|
||||||
|
'
|
||||||
|
|
||||||
|
- name: Push
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
no-cache: true
|
no-cache: true
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
build-args: |
|
build-args: |
|
||||||
|
|
@ -311,7 +335,41 @@ jobs:
|
||||||
quay.io/openwrt/sdk
|
quay.io/openwrt/sdk
|
||||||
tags: latest
|
tags: latest
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build
|
||||||
|
id: build
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
no-cache: true
|
||||||
|
push: false
|
||||||
|
tags: |
|
||||||
|
${{ steps.meta_ref.outputs.tags }}
|
||||||
|
${{ steps.meta_version.outputs.tags }}
|
||||||
|
${{ steps.meta_master.outputs.tags }}
|
||||||
|
${{ steps.meta_target_arch.outputs.tags }}
|
||||||
|
${{ steps.meta_latest.outputs.tags }}
|
||||||
|
build-args: |
|
||||||
|
DOWNLOAD_FILE=sdk-.*.Linux-x86_64.tar.[xz|zst]
|
||||||
|
VERSION_PATH=${{ needs.generate_matrix.outputs.version_path }}
|
||||||
|
TARGET=${{ matrix.target }}
|
||||||
|
FILE_HOST=${{ needs.generate_matrix.outputs.file_host }}
|
||||||
|
RUN_SETUP=${{ needs.generate_matrix.outputs.run_setup }}
|
||||||
|
labels: ${{ steps.meta_ref.outputs.labels }}
|
||||||
|
|
||||||
|
- name: Smoke test
|
||||||
|
run: |
|
||||||
|
docker run --rm ${{ steps.build.outputs.imageid }} \
|
||||||
|
bash -c ' \
|
||||||
|
cd $HOME && \
|
||||||
|
bash ./setup.sh && \
|
||||||
|
make defconfig && \
|
||||||
|
sed -i -E "s;git.openwrt.org/(feed|project|openwrt);github.com/openwrt;" feeds.conf.default && \
|
||||||
|
./scripts/feeds update base && \
|
||||||
|
./scripts/feeds install urngd && \
|
||||||
|
make package/urngd/{clean,compile} V=s -j$(nproc) && \
|
||||||
|
find ./bin/packages -name urngd*.?pk | grep ^./bin/packages/.*urngd \
|
||||||
|
'
|
||||||
|
|
||||||
|
- name: Push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
no-cache: true
|
no-cache: true
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue