Skip to content

Commit

Permalink
ci: build e2e binaries and free disk space on necessary (#4059)
Browse files Browse the repository at this point in the history
Signed-off-by: zhangzujian <[email protected]>
  • Loading branch information
zhangzujian authored May 21, 2024
1 parent f00ff13 commit 7218010
Showing 1 changed file with 47 additions and 30 deletions.
77 changes: 47 additions & 30 deletions .github/workflows/build-x86-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ jobs:
outputs:
build-base: ${{ steps.check.outputs.build-base }}
steps:
- uses: jlumbroso/[email protected]
with:
android: true
dotnet: true
haskell: true
docker-images: false
large-packages: false
tool-cache: false
swap-storage: false

- uses: actions/checkout@v4
with:
fetch-depth: 2
Expand All @@ -57,6 +47,17 @@ jobs:
echo build-base=1 >> "$GITHUB_OUTPUT"
fi
- uses: jlumbroso/[email protected]
if: steps.check.outputs.build-base == 1
with:
android: true
dotnet: true
haskell: true
docker-images: false
large-packages: false
tool-cache: false
swap-storage: false

- uses: docker/setup-buildx-action@v3
if: steps.check.outputs.build-base == 1

Expand All @@ -80,16 +81,6 @@ jobs:
outputs:
build-dpdk-base: ${{ steps.check.outputs.build-dpdk-base }}
steps:
- uses: jlumbroso/[email protected]
with:
android: true
dotnet: true
haskell: true
docker-images: false
large-packages: false
tool-cache: false
swap-storage: false

- uses: actions/checkout@v4
with:
fetch-depth: 2
Expand All @@ -103,6 +94,17 @@ jobs:
echo build-dpdk-base=1 >> "$GITHUB_OUTPUT"
fi
- uses: jlumbroso/[email protected]
if: steps.check.outputs.build-dpdk-base == 1
with:
android: true
dotnet: true
haskell: true
docker-images: false
large-packages: false
tool-cache: false
swap-storage: false

- uses: docker/setup-buildx-action@v3
if: steps.check.outputs.build-dpdk-base == 1

Expand Down Expand Up @@ -263,16 +265,6 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 15
steps:
- uses: jlumbroso/[email protected]
with:
android: true
dotnet: true
haskell: true
docker-images: false
large-packages: false
tool-cache: false
swap-storage: false

- uses: actions/checkout@v4

- name: Create the default branch directory
Expand Down Expand Up @@ -305,7 +297,30 @@ jobs:
- name: Export Go full version
run: echo "GO_FULL_VER=$(go env GOVERSION)" >> "$GITHUB_ENV"

- name: Lookup Go cache
id: lookup-go-cache
uses: actions/cache/restore@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }}
restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-
lookup-only: true

- uses: jlumbroso/[email protected]
if: steps.lookup-go-cache.outputs.cache-hit != 'true'
with:
android: true
dotnet: true
haskell: true
docker-images: false
large-packages: false
tool-cache: false
swap-storage: false

- name: Go cache
if: steps.lookup-go-cache.outputs.cache-hit != 'true'
uses: actions/cache@v4
with:
path: |
Expand All @@ -315,10 +330,12 @@ jobs:
restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-

- name: Install ginkgo
if: steps.lookup-go-cache.outputs.cache-hit != 'true'
working-directory: ${{ env.E2E_DIR }}
run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo

- run: make e2e-build
if: steps.lookup-go-cache.outputs.cache-hit != 'true'
working-directory: ${{ env.E2E_DIR }}

netpol-path-filter:
Expand Down

0 comments on commit 7218010

Please sign in to comment.