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