Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into cve-fix-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
fasmat committed May 21, 2024
2 parents 79fa07c + 25222c1 commit 82ed939
Show file tree
Hide file tree
Showing 37 changed files with 455 additions and 272 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ concurrency:
jobs:
## stage 0: check which files were changed
filter-changes:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
nondocchanges: ${{ steps.filter.outputs.nondoc }}
steps:
Expand All @@ -55,7 +55,7 @@ jobs:
## these run on all pushes to all pull requests, all branches
## note that secrets may not be accessible in this phase
quicktests:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: filter-changes
if: ${{ needs.filter-changes.outputs.nondocchanges == 'true' }}
# should not take more than 2-3 mins
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
make test-generate
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: filter-changes
if: ${{ needs.filter-changes.outputs.nondocchanges == 'true' }}
# should not take more than 15-16 mins
Expand Down Expand Up @@ -126,17 +126,17 @@ jobs:
fail-fast: true
matrix:
os:
- ubuntu-latest
- ubuntu-22.04
- [self-hosted, linux, arm64]
- macos-13
- [self-hosted, macOS, ARM64, go-spacemesh]
- windows-latest
- windows-2022
steps:
- name: Add OpenCL support - Ubuntu
if: ${{ matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: sudo apt-get update -q && sudo apt-get install -qy ocl-icd-opencl-dev libpocl2
- name: disable Windows Defender - Windows
if: ${{ matrix.os == 'windows-latest' }}
if: ${{ matrix.os == 'windows-2022' }}
run: |
Set-MpPreference -DisableRealtimeMonitoring $true
- name: checkout
Expand Down Expand Up @@ -172,17 +172,17 @@ jobs:
fail-fast: true
matrix:
os:
- ubuntu-latest
- ubuntu-22.04
- [self-hosted, linux, arm64]
- macos-13
- [self-hosted, macOS, ARM64, go-spacemesh]
- windows-latest
- windows-2022
steps:
- name: Add OpenCL support - Ubuntu
if: ${{ matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: sudo apt-get update -q && sudo apt-get install -qy ocl-icd-opencl-dev libpocl2
- name: disable Windows Defender - Windows
if: ${{ matrix.os == 'windows-latest' }}
if: ${{ matrix.os == 'windows-2022' }}
run: |
Set-MpPreference -DisableRealtimeMonitoring $true
- name: checkout
Expand Down Expand Up @@ -216,16 +216,16 @@ jobs:
fail-fast: true
matrix:
os:
- ubuntu-latest
- ubuntu-22.04
- [self-hosted, linux, arm64]
- macos-13
- [self-hosted, macOS, ARM64, go-spacemesh]
- windows-latest
- windows-2022
steps:
# as we use some request to localhost, sometimes it gives us flaky tests. try to disable tcp offloading for fix it
# https://github.com/actions/virtual-environments/issues/1187
- name: disable TCP/UDP offload - Ubuntu
if: ${{ matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
sudo ethtool -K eth0 tx off
sudo ethtool -K eth0 rx off
Expand All @@ -236,11 +236,11 @@ jobs:
sudo sysctl -w net.link.generic.system.hwcksum_tx=0
sudo sysctl -w net.link.generic.system.hwcksum_rx=0
- name: disable TCP/UDP offload - Windows
if: ${{ matrix.os == 'windows-latest' }}
if: ${{ matrix.os == 'windows-2022' }}
run: |
Disable-NetAdapterChecksumOffload -Name * -TcpIPv4 -UdpIPv4 -TcpIPv6 -UdpIPv6
- name: disable Windows Defender - Windows
if: ${{ matrix.os == 'windows-latest' }}
if: ${{ matrix.os == 'windows-2022' }}
run: |
Set-MpPreference -DisableRealtimeMonitoring $true
- name: checkout
Expand All @@ -262,10 +262,10 @@ jobs:
go-version: ${{ env.go-version }}
cache: ${{ runner.arch != 'arm64' }}
- name: Add OpenCL support - Ubuntu
if: ${{ matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: sudo apt-get update -q && sudo apt-get install -qy ocl-icd-opencl-dev libpocl2
- name: Add OpenCL support - Windows
if: ${{ matrix.os == 'windows-latest' }}
if: ${{ matrix.os == 'windows-2022' }}
run: choco install opencl-intel-cpu-runtime
- name: setup env
run: make install
Expand Down Expand Up @@ -295,7 +295,7 @@ jobs:
- build-tools
- build
- unittests
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
# short-circuit success if no non-doc files were modified
# this is the easiest way to access success/failure state of previous jobs in this workflow
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
filter-changes:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
nondocchanges: ${{ steps.filter.outputs.nondoc }}
steps:
Expand All @@ -28,7 +28,7 @@ jobs:
- '!**/*.md'
coverage:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: filter-changes
if: ${{ needs.filter-changes.outputs.nondocchanges == 'true' }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
default: ''
jobs:
dockerpush:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-latest
- os: ubuntu-22.04
outname_sufix: "linux-amd64"
- os: [self-hosted, linux, arm64]
outname_sufix: "linux-arm64"
- os: macos-13
outname_sufix: "mac-amd64"
- os: [self-hosted, macOS, ARM64, go-spacemesh]
outname_sufix: "mac-arm64"
- os: windows-latest
- os: windows-2022
outname_sufix: "win-amd64"
steps:
- shell: bash
run: echo "OUTNAME=go-spacemesh-${{ github.ref_name }}-${{ matrix.outname_sufix }}" >> $GITHUB_ENV

- name: Install dependencies in windows
if: ${{ matrix.os == 'windows-latest' }}
if: ${{ matrix.os == 'windows-2022' }}
run: choco install make wget zip

- name: Add OpenCL support - Ubuntu
if: ${{ matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: sudo apt-get update -q && sudo apt-get install -qy ocl-icd-opencl-dev libpocl2

- name: disable Windows Defender - Windows
if: ${{ matrix.os == 'windows-latest' }}
if: ${{ matrix.os == 'windows-2022' }}
run: |
Set-MpPreference -DisableRealtimeMonitoring $true
Expand Down Expand Up @@ -99,13 +99,13 @@ jobs:
run: brew install coreutils

- name: Calculate the hashsum of the zip file
if: ${{ matrix.os != 'windows-latest' }}
if: ${{ matrix.os != 'windows-2022' }}
shell: bash
run: |
sha256sum ${{ env.OUTNAME }}.zip | awk '{ print $1 }' > sha256-${{ matrix.outname_sufix }}.txt
- name: Calculate the hashsum of the zip file (Windows)
if: ${{ matrix.os == 'windows-latest' }}
if: ${{ matrix.os == 'windows-2022' }}
run: |
(Get-FileHash ${{ env.OUTNAME }}.zip -Algorithm SHA256).Hash > sha256-${{ matrix.outname_sufix }}.txt
Expand All @@ -117,7 +117,7 @@ jobs:
retention-days: 5

release:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: build-and-upload
steps:
- name: Download the artifacts
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/systest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ concurrency:

jobs:
filter-changes:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
nondocchanges: ${{ steps.filter.outputs.nondoc }}
steps:
Expand All @@ -53,7 +53,7 @@ jobs:
- '!**/*.md'
systest:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: ${{ needs.filter-changes.outputs.nondocchanges == 'true' }}
needs:
- filter-changes
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
needs:
- filter-changes
- systest
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
# short-circuit success if no non-doc files were modified
status: ${{ (needs.filter-changes.outputs.nondocchanges == 'false' || needs.systest.result == 'success') && 'success' || 'failure' }}
Expand Down
Loading

0 comments on commit 82ed939

Please sign in to comment.