Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workaround for self-hosted GH Action runner problem #260

Merged
merged 1 commit into from
May 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ jobs:
# avoid conflicts between parallel jobs
K8S_ID_SUFFIX: ${{ matrix.build_type }}
steps:
# https://github.com/actions/runner/issues/434#issuecomment-992865457
- name: Clean the workspace
uses: docker://alpine
with:
args: /bin/sh -c "rm -rf /github/workspace/.* 2>/dev/null || rm -rf /github/workspace/*"
- name: Login to the registry
uses: docker/login-action@v1
with:
Expand Down Expand Up @@ -83,6 +88,10 @@ jobs:
checkstyle:
runs-on: ["self-hosted", "hugepages"]
steps:
- name: Clean the workspace
uses: docker://alpine
with:
args: /bin/sh -c "rm -rf /github/workspace/.* 2>/dev/null || rm -rf /github/workspace/*"
- name: Login to the registry
uses: docker/login-action@v1
with:
Expand All @@ -107,6 +116,10 @@ jobs:
BUILD_TYPE: ${{ matrix.build_type }}
needs: build
steps:
- name: Clean the workspace
uses: docker://alpine
with:
args: /bin/sh -c "rm -rf /github/workspace/.* 2>/dev/null || rm -rf /github/workspace/*"
- name: Login to the registry
uses: docker/login-action@v1
with:
Expand Down Expand Up @@ -137,6 +150,10 @@ jobs:
BUILD_TYPE: ${{ matrix.build_type }}
needs: build
steps:
- name: Clean the workspace
uses: docker://alpine
with:
args: /bin/sh -c "rm -rf /github/workspace/.* 2>/dev/null || rm -rf /github/workspace/*"
- name: Login to the registry
uses: docker/login-action@v1
with:
Expand All @@ -156,7 +173,7 @@ jobs:
run: |
dev_image=$(cat image-dev-${BUILD_TYPE}.txt)
mkdir junit-output
make retest-e2e \
if ! make retest-e2e \
DEV_IMAGE="${dev_image}" \
E2E_RETEST=y \
E2E_PARALLEL=y \
Expand All @@ -167,7 +184,10 @@ jobs:
E2E_FOCUS="${E2E_FOCUS}" \
E2E_SKIP="${E2E_SKIP}" \
E2E_NO_GDB=1 \
GRAB_ARTIFACTS=1
GRAB_ARTIFACTS=1; then
docker run -v "${PWD}:/src" alpine /bin/sh -c "chown -v -R $(id -u).$(id -g) /src/artifacts"
exit 1
fi
- name: Upload artifacts for failed tests
if: failure()
uses: actions/upload-artifact@v2
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ jobs:
release:
runs-on: self-hosted
steps:
- name: Clean the workspace
uses: docker://alpine
with:
args: /bin/sh -c "rm -rf /github/workspace/.* 2>/dev/null || rm -rf /github/workspace/*"

- name: Checkout
uses: actions/checkout@v2

Expand Down