Capture build artifacts for failed builds
Motivation: When a build fails, it's desirable to have the build artifacts available so the build failure can be inspected, investigated and hopefully fixed. Modification: Change the Makefile and CI workflow such that the build artifacts are captured and uploaded when the build fails. Result: A "target.zip" file is now available for download on failed GitHub Actions builds.
This commit is contained in:
parent
e039f6f7f5
commit
e3c7f9b632
6
.github/workflows/ci-workflow.yml
vendored
6
.github/workflows/ci-workflow.yml
vendored
|
@ -43,3 +43,9 @@ jobs:
|
||||||
# Run the make script
|
# Run the make script
|
||||||
- name: Make build
|
- name: Make build
|
||||||
run: make build
|
run: make build
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
if: ${{ failure() }}
|
||||||
|
with:
|
||||||
|
name: target
|
||||||
|
path: target/ # or path/to/artifact
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -17,7 +17,7 @@ clean:
|
||||||
|
|
||||||
build: image
|
build: image
|
||||||
docker create --name build-container netty-incubator-buffer:build
|
docker create --name build-container netty-incubator-buffer:build
|
||||||
docker start -a build-container
|
docker start -a build-container || (docker cp build-container:/home/build/target . && false)
|
||||||
docker wait build-container
|
docker wait build-container || (docker cp build-container:/home/build/target . && false)
|
||||||
docker cp build-container:/home/build/target .
|
docker cp build-container:/home/build/target .
|
||||||
docker rm build-container
|
docker rm build-container
|
||||||
|
|
|
@ -27,8 +27,7 @@ final class CompositeBuf extends RcSupport<Buf, CompositeBuf> implements Buf {
|
||||||
* non-composite copy of the buffer.
|
* non-composite copy of the buffer.
|
||||||
*/
|
*/
|
||||||
private static final int MAX_CAPACITY = Integer.MAX_VALUE - 8;
|
private static final int MAX_CAPACITY = Integer.MAX_VALUE - 8;
|
||||||
private static final Drop<CompositeBuf>
|
private static final Drop<CompositeBuf> COMPOSITE_DROP = new Drop<CompositeBuf>() {
|
||||||
COMPOSITE_DROP = new Drop<CompositeBuf>() {
|
|
||||||
@Override
|
@Override
|
||||||
public void drop(CompositeBuf obj) {
|
public void drop(CompositeBuf obj) {
|
||||||
for (Buf buf : obj.bufs) {
|
for (Buf buf : obj.bufs) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user