reduced the number of artifacts to a reasonable number (#853)

* Consolidate all binaries into one artifact bucket

* Remove unused variables from cmake matrix

* Consolidate dpkg and rpm packages into one bucket each

* Consolidate all the coverage reports into one bucket

* Consolidate all the test outputs into one bucket

* Avoid the artifact prefix removal using a simple hack, but upload the expected test results as a consequance
This commit is contained in:
Hamish Coleman 2021-10-15 15:34:52 +01:00 committed by GitHub
parent c3c72e2656
commit 1670b14d69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 36 deletions

View File

@ -17,20 +17,8 @@ jobs:
matrix:
include:
- os: ubuntu-latest
TARGET: x86_64-unknown-linux-musl
COMPILER: gcc
LINKER: gcc
- os: ubuntu-latest
TARGET: armv7-unknown-linux-musleabihf
COMPILER: arm-linux-gnueabihf-gcc-5
LINKER: gcc-5-arm-linux-gnueabihf
- os: windows-latest
COMPILER: cl
LINKER: cl
- os: macos-latest
TARGET: x86_64-apple-darwin
COMPILER: clang
LINKER: clang
steps:
- uses: actions/checkout@v2

View File

@ -53,23 +53,30 @@ jobs:
run: make test
shell: bash
- if: ${{ always() }}
name: Move test outputs to an arch specific location
shell: bash
run: |
mkdir -p tests/${{ matrix.os }}
mv tests/*.out tests/${{ matrix.os }}
- if: ${{ always() }}
name: Upload tests output
uses: actions/upload-artifact@v2
with:
name: tests-out-${{matrix.os}}
path: tests/*.out
name: tests-out
path: tests
- name: Generate coverage reports
run: |
make gcov
make cover
make cover COVERAGEDIR=coverage/${{ matrix.os }}
shell: bash
- name: Upload gcovr report artifact
uses: actions/upload-artifact@v2
with:
name: coverage-${{matrix.os}}
name: coverage
path: coverage
- name: Upload data to codecov
@ -109,23 +116,30 @@ jobs:
run: make test
shell: bash
- if: ${{ always() }}
name: Move test outputs to an arch specific location
shell: bash
run: |
mkdir -p tests/${{ matrix.os }}
mv tests/*.out tests/${{ matrix.os }}
- if: ${{ always() }}
name: Upload tests output
uses: actions/upload-artifact@v2
with:
name: tests-out-${{matrix.os}}
path: tests/*.out
name: tests-out
path: tests
- name: Generate coverage reports
run: |
make gcov
make cover
make cover COVERAGEDIR=coverage/${{ matrix.os }}
shell: bash
- name: Upload gcovr report artifact
uses: actions/upload-artifact@v2
with:
name: coverage-${{matrix.os}}
name: coverage
path: coverage
- name: Upload data to codecov
@ -169,12 +183,19 @@ jobs:
run: make test
shell: bash
- if: ${{ always() }}
name: Move test outputs to an arch specific location
shell: bash
run: |
mkdir -p tests/${{ matrix.os }}
mv tests/*.out tests/${{ matrix.os }}
- if: ${{ always() }}
name: Upload tests output
uses: actions/upload-artifact@v2
with:
name: tests-out-${{matrix.os}}
path: tests/*.out
name: tests-out
path: tests
- name: Generate coverage data
run: |
@ -225,7 +246,7 @@ jobs:
- name: Upload dpkg
uses: actions/upload-artifact@v2
with:
name: package-dpkg-${{ matrix.arch }}
name: packages-dpkg
path: packages/debian/*.deb
package_rpm:
@ -261,7 +282,7 @@ jobs:
- name: Upload rpm
uses: actions/upload-artifact@v2
with:
name: package-rpm-x86_64
name: packages-rpm
path: rpmbuild/RPMS/x86_64/*.rpm
binaries_windows:
@ -281,12 +302,12 @@ jobs:
- name: Create binary dir
shell: bash
run: |
make install DESTDIR=binaries
make install DESTDIR=binaries/x86_64-pc-mingw64
- name: Upload binary zip
- name: Upload binary artifacts
uses: actions/upload-artifact@v2
with:
name: binaries-x86_64-pc-mingw64
name: binaries
path: binaries
binaries_macos:
@ -311,12 +332,12 @@ jobs:
- name: Create binary dir
shell: bash
run: |
make install DESTDIR=binaries
make install DESTDIR=binaries/x86_64-apple-darwin
- name: Upload binary zip
- name: Upload binary artifacts
uses: actions/upload-artifact@v2
with:
name: binaries-x86_64-apple-darwin
name: binaries
path: binaries
binaries_linux_crosscompile:
@ -356,10 +377,10 @@ jobs:
- name: Create binary dir
shell: bash
run: |
make install DESTDIR=binaries
make install DESTDIR=binaries/${{ matrix.arch }}
- name: Upload binary zip
- name: Upload binary artifacts
uses: actions/upload-artifact@v2
with:
name: binaries-${{ matrix.arch }}
name: binaries
path: binaries

View File

@ -110,6 +110,8 @@ DOCS=edge.8.gz supernode.1.gz n2n.7.gz
SUBDIRS+=tools
COVERAGEDIR?=coverage
.PHONY: $(SUBDIRS)
.PHONY: steps build push all clean install test cover gcov build-dep
all: $(APPS) $(DOCS) $(SUBDIRS)
@ -152,8 +154,8 @@ test: tools
# and run the desired tests. Ensure that package gcovr is installed
# and then run "make cover"
cover:
mkdir -p coverage
gcovr -s --html --html-details --output=coverage/index.html
mkdir -p $(COVERAGEDIR)
gcovr -s --html --html-details --output=$(COVERAGEDIR)/index.html
# Use coverage data to generate gcov text report files.
# Unfortunately, these end up in the wrong directory due to the
@ -175,7 +177,7 @@ else
endif
clean:
rm -rf $(N2N_OBJS) $(N2N_LIB) $(APPS) $(DOCS) coverage/ *.dSYM *~
rm -rf $(N2N_OBJS) $(N2N_LIB) $(APPS) $(DOCS) $(COVERAGEDIR)/ *.dSYM *~
rm -f tests/*.out src/*.gcno src/*.gcda
for dir in $(SUBDIRS); do $(MAKE) -C $$dir clean; done