Skip to content

Commit

Permalink
always cache delete
Browse files Browse the repository at this point in the history
  • Loading branch information
parvit committed May 4, 2024
1 parent 64acbbe commit 81bb42d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 24 deletions.
23 changes: 7 additions & 16 deletions .github/workflows/common-performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ on:
type: string
default: 'basic'
required: false
ignore_caches:
description: 'resets caches to force new build'
type: boolean
default: false
required: true

jobs:
build-client:
Expand All @@ -87,7 +82,6 @@ jobs:
gh cache delete ${{ env.CACHE_KEY }}
- name: Restore cached build
if: ${{ ! inputs.ignore_caches }}
id: cache-build
uses: actions/cache/restore@v4
with:
Expand All @@ -104,31 +98,31 @@ jobs:
gh cache delete --repo project-faster/qpep $old_id
- name: Cleanup workspace
if: ${{ inputs.ignore_caches || steps.cache-build.outputs.cache-hit != 'true' }}
if: ${{ steps.cache-build.outputs.cache-hit != 'true' }}
shell: pwsh
run: |
rm ${{ github.workspace }}\* -r -force
- uses: actions/checkout@v4
if: ${{ inputs.ignore_caches || steps.cache-build.outputs.cache-hit != 'true' }}
if: ${{ steps.cache-build.outputs.cache-hit != 'true' }}
with:
clean: true
submodules: true

- name: Set up Go
if: ${{ inputs.ignore_caches || steps.cache-build.outputs.cache-hit != 'true' }}
if: ${{ steps.cache-build.outputs.cache-hit != 'true' }}
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}

- name: Set up CMake
if: ${{ inputs.ignore_caches || steps.cache-build.outputs.cache-hit != 'true' }}
if: ${{ steps.cache-build.outputs.cache-hit != 'true' }}
uses: jwlawson/[email protected]
with:
cmake-version: ${{ env.CMAKE_VERSION }}

- name: Prepare
if: ${{ inputs.ignore_caches || steps.cache-build.outputs.cache-hit != 'true' }}
if: ${{ steps.cache-build.outputs.cache-hit != 'true' }}
shell: pwsh
run: |
New-Item -Path . -Name "build" -ItemType "directory" -Force | Out-Null
Expand All @@ -137,7 +131,7 @@ jobs:
Copy-Item "./windivert/x64/*" -Destination "./build"
- name: Build Client (Backends)
if: ${{ inputs.ignore_caches || steps.cache-build.outputs.cache-hit != 'true' }}
if: ${{ steps.cache-build.outputs.cache-hit != 'true' }}
shell: cmd
run: |
set CGO_ENABLED=1
Expand All @@ -148,7 +142,7 @@ jobs:
go generate
- name: Build Client
if: ${{ inputs.ignore_caches || steps.cache-build.outputs.cache-hit != 'true' }}
if: ${{ steps.cache-build.outputs.cache-hit != 'true' }}
shell: cmd
run: |
set CGO_ENABLED=1
Expand Down Expand Up @@ -303,7 +297,6 @@ jobs:
QPEP_BACKEND: ${{ inputs.backend }}
QPEP_CCA: ${{ inputs.cca }}
QPEP_SLOWSTART: ${{ inputs.slowstart }}
# QPEP_ADDRESS: ${{ inputs.server_public_address }}
QPEP_GATEWAY: 127.0.0.1
QPEP_ADDRESS: 127.0.0.1
steps:
Expand All @@ -321,7 +314,6 @@ jobs:
go-version: ${{ env.GO_VERSION }}

- name: Cleanup all docker
if: ${{ inputs.ignore_caches }}
run: |
docker system prune -af || true
Expand Down Expand Up @@ -367,7 +359,6 @@ jobs:
QPEP_BACKEND: ${{ inputs.backend }}
QPEP_CCA: ${{ inputs.cca }}
QPEP_SLOWSTART: ${{ inputs.slowstart }}
# QPEP_ADDRESS: ${{ inputs.server_public_address }}
QPEP_GATEWAY: 127.0.0.1
QPEP_ADDRESS: 127.0.0.1
steps:
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ on:
type: string
default: eth0
required: true
ignore_caches:
description: 'resets caches to force new build'
type: boolean
default: false
required: true
keep_aws_running:
description: 'keeps aws vm running for subsequent runs'
type: boolean
Expand Down Expand Up @@ -69,7 +64,7 @@ jobs:
stop-aws-vm:
runs-on: ubuntu-latest
needs: qpep-run
needs: performance-run
if: ${{ always() && ! inputs.keep_aws_running }}
steps:
- name: Install AWS cli
Expand All @@ -83,7 +78,7 @@ jobs:
aws ec2 stop-instances --instance-ids ${{ secrets.AWS_INSTANCE_ID }}
shell: bash
qpep-run:
performance-run:
needs: launch-aws-vm
strategy:
max-parallel: 1
Expand All @@ -99,7 +94,6 @@ jobs:
cca: 'cubic'
uses: './.github/workflows/common-performance.yml'
with:
ignore_caches: ${{ inputs.ignore_caches }}
server_public_address: ${{ inputs.server_public_address }}
server_private_address: ${{ inputs.server_private_address }}
client_listen_address: ${{ inputs.client_listen_address }}
Expand Down

0 comments on commit 81bb42d

Please sign in to comment.