Skip to content

Commit

Permalink
chore: reduce network flakines on GH hosted runners
Browse files Browse the repository at this point in the history
OS-neutral interface to disable TCP/UDP offload to fix flaky networking on GitHub-hosted runners

See https://github.com/smorimoto/tune-github-hosted-runner-network/blob/main/action.yml
  • Loading branch information
mdelapenya committed Feb 18, 2024
1 parent f9a07ef commit 7ce031e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci-test-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,23 @@ jobs:
working-directory: ./${{ inputs.project-directory }}
run: go build

- name: Tune Linux Network
if: ${{ runner.os == 'Linux' }}
shell: bash
run: sudo ethtool -K eth0 tx off rx off

- name: Tune Windows Network
if: ${{ runner.os == 'Windows' }}
shell: pwsh
run: Disable-NetAdapterChecksumOffload -Name * -TcpIPv4 -UdpIPv4 -TcpIPv6 -UdpIPv6

- name: Tune macOS Network
if: ${{ runner.os == 'macOS' }}
shell: bash
run: |
sudo sysctl -w net.link.generic.system.hwcksum_tx=0
sudo sysctl -w net.link.generic.system.hwcksum_rx=0
- name: go test
# only run tests on linux, there are a number of things that won't allow the tests to run on anything else
# many (maybe, all?) images used can only be build on Linux, they don't have Windows in their manifest, and
Expand Down

0 comments on commit 7ce031e

Please sign in to comment.