Commit e1b3dcd7 authored by Yossi Gottlieb's avatar Yossi Gottlieb Committed by YaacovHazan
Browse files

Use cross-platform-actions for FreeBSD support. (#12732)

This change overcomes many stability issues experienced with the
vmactions action.

We need to limit VMs to 8GB for better stability, as the 13GB default
seems to hang them occasionally.

Shell code has been simplified since this action seem to use `bash -e`
which will abort on non-zero exit codes anyway.
parent 3a17679f
...@@ -891,16 +891,20 @@ jobs: ...@@ -891,16 +891,20 @@ jobs:
repository: ${{ env.GITHUB_REPOSITORY }} repository: ${{ env.GITHUB_REPOSITORY }}
ref: ${{ env.GITHUB_HEAD_REF }} ref: ${{ env.GITHUB_HEAD_REF }}
- name: test - name: test
uses: vmactions/freebsd-vm@v0.3.1 uses: cross-platform-actions/action@v0.21.1
env:
MAKE: gmake
with: with:
usesh: true operating_system: freebsd
sync: rsync environment_variables: MAKE
copyback: false version: 13.2
prepare: pkg install -y bash gmake lang/tcl86 lang/tclx memory: 8GB
run: > shell: bash
gmake || exit 1 ; run: |
if echo "${{github.event.inputs.skiptests}}" | grep -vq redis ; then ./runtest --verbose --timeout 2400 --no-latency --dump-logs ${{github.event.inputs.test_args}} || exit 1 ; fi ; sudo pkg install -y bash gmake lang/tcl86 lang/tclx
if echo "${{github.event.inputs.skiptests}}" | grep -vq modules ; then MAKE=gmake ./runtest-moduleapi --verbose --timeout 2400 --no-latency --dump-logs ${{github.event.inputs.test_args}} || exit 1 ; fi ; gmake
if echo "${{github.event.inputs.skiptests}}" | grep -vq redis ; then ./runtest --verbose --timeout 2400 --no-latency --dump-logs ${{github.event.inputs.test_args}} ; fi
if echo "${{github.event.inputs.skiptests}}" | grep -vq modules ; then ./runtest-moduleapi --verbose --timeout 2400 --no-latency --dump-logs ${{github.event.inputs.test_args}} ; fi
test-freebsd-sentinel: test-freebsd-sentinel:
runs-on: macos-12 runs-on: macos-12
...@@ -923,15 +927,16 @@ jobs: ...@@ -923,15 +927,16 @@ jobs:
repository: ${{ env.GITHUB_REPOSITORY }} repository: ${{ env.GITHUB_REPOSITORY }}
ref: ${{ env.GITHUB_HEAD_REF }} ref: ${{ env.GITHUB_HEAD_REF }}
- name: test - name: test
uses: vmactions/freebsd-vm@v0.3.1 uses: cross-platform-actions/action@v0.21.1
with: with:
usesh: true operating_system: freebsd
sync: rsync version: 13.2
copyback: false memory: 8GB
prepare: pkg install -y bash gmake lang/tcl86 lang/tclx shell: bash
run: > run: |
gmake || exit 1 ; sudo pkg install -y bash gmake lang/tcl86 lang/tclx
if echo "${{github.event.inputs.skiptests}}" | grep -vq sentinel ; then ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} || exit 1 ; fi ; gmake
if echo "${{github.event.inputs.skiptests}}" | grep -vq sentinel ; then ./runtest-sentinel ${{github.event.inputs.cluster_test_args}} ; fi
test-freebsd-cluster: test-freebsd-cluster:
runs-on: macos-12 runs-on: macos-12
...@@ -954,15 +959,16 @@ jobs: ...@@ -954,15 +959,16 @@ jobs:
repository: ${{ env.GITHUB_REPOSITORY }} repository: ${{ env.GITHUB_REPOSITORY }}
ref: ${{ env.GITHUB_HEAD_REF }} ref: ${{ env.GITHUB_HEAD_REF }}
- name: test - name: test
uses: vmactions/freebsd-vm@v0.3.1 uses: cross-platform-actions/action@v0.21.1
with: with:
usesh: true operating_system: freebsd
sync: rsync version: 13.2
copyback: false memory: 8GB
prepare: pkg install -y bash gmake lang/tcl86 lang/tclx shell: bash
run: > run: |
gmake || exit 1 ; sudo pkg install -y bash gmake lang/tcl86 lang/tclx
if echo "${{github.event.inputs.skiptests}}" | grep -vq cluster ; then ./runtest-cluster ${{github.event.inputs.cluster_test_args}} || exit 1 ; fi ; gmake
if echo "${{github.event.inputs.skiptests}}" | grep -vq cluster ; then ./runtest-cluster ${{github.event.inputs.cluster_test_args}} ; fi
test-alpine-jemalloc: test-alpine-jemalloc:
runs-on: ubuntu-latest runs-on: ubuntu-latest
......
...@@ -300,15 +300,21 @@ start_server {tags {"info" "external:skip"}} { ...@@ -300,15 +300,21 @@ start_server {tags {"info" "external:skip"}} {
test {stats: instantaneous metrics} { test {stats: instantaneous metrics} {
r config resetstat r config resetstat
set retries 0
for {set retries 1} {$retries < 4} {incr retries} {
after 1600 ;# hz is 10, wait for 16 cron tick so that sample array is fulfilled after 1600 ;# hz is 10, wait for 16 cron tick so that sample array is fulfilled
set value [s instantaneous_eventloop_cycles_per_sec] set value [s instantaneous_eventloop_cycles_per_sec]
if {$value > 0} break
}
assert_lessthan $retries 4
if {$::verbose} { puts "instantaneous metrics instantaneous_eventloop_cycles_per_sec: $value" } if {$::verbose} { puts "instantaneous metrics instantaneous_eventloop_cycles_per_sec: $value" }
assert_morethan $value 0 assert_morethan $value 0
assert_lessthan $value 15 ;# default hz is 10 assert_lessthan $value [expr $retries*15] ;# default hz is 10
set value [s instantaneous_eventloop_duration_usec] set value [s instantaneous_eventloop_duration_usec]
if {$::verbose} { puts "instantaneous metrics instantaneous_eventloop_duration_usec: $value" } if {$::verbose} { puts "instantaneous metrics instantaneous_eventloop_duration_usec: $value" }
assert_morethan $value 0 assert_morethan $value 0
assert_lessthan $value 22000 ;# default hz is 10, so duration < 1000 / 10, allow some tolerance assert_lessthan $value [expr $retries*22000] ;# default hz is 10, so duration < 1000 / 10, allow some tolerance
} }
test {stats: debug metrics} { test {stats: debug metrics} {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment