ops: use docker-run-action
This commit is contained in:
@@ -51,10 +51,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: docker/setup-buildx-action@v2
|
- uses: docker/setup-buildx-action@v2
|
||||||
- name: Install Docker
|
|
||||||
run: |
|
|
||||||
apt update
|
|
||||||
apt install -y docker
|
|
||||||
- uses: actions/setup-go@v3
|
- uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: '1.20'
|
go-version: '1.20'
|
||||||
@@ -71,28 +67,21 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: /tmp/docker
|
path: /tmp/docker
|
||||||
key: ${{ runner.os }}-docker-${{ steps.dockerfile-hash.outputs.hash }}
|
key: ${{ runner.os }}-docker-${{ steps.dockerfile-hash.outputs.hash }}
|
||||||
-
|
|
||||||
name: Load image
|
|
||||||
run: |
|
|
||||||
docker load --input /tmp/docker/${{ runner.os }}-builder-image.tar
|
|
||||||
docker image ls -a
|
|
||||||
-
|
-
|
||||||
name: Build library
|
name: Build library
|
||||||
run: |
|
uses: https://github.com/addnab/docker-run-action@v3
|
||||||
docker run \
|
with:
|
||||||
--rm \
|
image: cproject-builder:latest
|
||||||
--workdir /builder/mnt \
|
options: -v ${{ github.workspace }}:/builder/mnt --workdir /builder/mnt
|
||||||
-v ${{ github.workspace }}:/builder/mnt \
|
run: |
|
||||||
cproject-builder:latest \
|
|
||||||
/bin/bash -c "rm -rf build; cmake -B build; cmake --build build"
|
/bin/bash -c "rm -rf build; cmake -B build; cmake --build build"
|
||||||
-
|
-
|
||||||
name: Test library
|
name: Test library
|
||||||
run: |
|
uses: https://github.com/addnab/docker-run-action@v3
|
||||||
docker run \
|
with:
|
||||||
--rm \
|
image: cproject-builder:latest
|
||||||
--workdir /builder/mnt/tests/unittest \
|
options: -v ${{ github.workspace }}:/builder/mnt --workdir /builder/mnt
|
||||||
-v ${{ github.workspace }}:/builder/mnt \
|
run: |
|
||||||
cproject-builder:latest \
|
|
||||||
/bin/bash -c "ceedling clobber; ceedling gcov:all; ceedling utils:gcov"
|
/bin/bash -c "ceedling clobber; ceedling gcov:all; ceedling utils:gcov"
|
||||||
-
|
-
|
||||||
name: Archive coverage results
|
name: Archive coverage results
|
||||||
|
|||||||
Reference in New Issue
Block a user