1515 strategy :
1616 fail-fast : false
1717 matrix :
18- host : [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
1918 os :
2019 - ' x64-debian-10'
2120 - ' x64-debian-11'
5352 - ' i386-debian-12'
5453
5554
56- runs-on : ${{ matrix.host }}
55+ runs-on : ubuntu-24.04
5756 timeout-minutes : 15
5857 steps :
5958 - name : Checkout
7372 set -ue; set -o pipefail
7473 cd Universe.CpuUsage.Tests
7574 Reset-Target-Framework -fw net48
76- time try-and-retry dotnet build -c Release -f net48 -o "$HOME/Artifacts " >/dev/null
75+ time try-and-retry dotnet build -c Release -f net48 -o "$HOME/Cpu-Usage-Tests " >/dev/null
7776
7877 - name : Pull VM
7978 run : |
@@ -91,37 +90,38 @@ jobs:
9190 on_retry_command : ' docker rm -f VM 2>/dev/null || true'
9291 command : |
9392 set -ue; set -o pipefail
94- cat << 'EOF' > "$HOME/Artifacts /lets-rock.sh"
95- Say "STARTING TESTS";
93+ cat << 'EOF' > "$HOME/Cpu-Usage-Tests /lets-rock.sh"
94+ Say "STARTING CPU USAGE TESTS";
9695 free -m;
97- nunit3-console --inprocess --workers=1 Universe.CpuUsage.Tests.dll | tee /job/PRECISION.LOG;
96+ nunit3-console --inprocess --workers=1 Universe.CpuUsage.Tests.dll 2>&1 | tee /job/PRECISION.LOG;
9897 Say "TESTS COMPLETED"
9998 EOF
100- cat "$HOME/Artifacts /lets-rock.sh"
99+ cat "$HOME/Cpu-Usage-Tests /lets-rock.sh"
101100 timeout 666 docker run --privileged -e VM_MEM=1000M -e VM_CPUS=2 -e QEMU_TCG_ACCELERATOR=tcg --name VM --hostname VM --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined -t \
102- -v "$HOME/Artifacts ":/job \
101+ -v "$HOME/Cpu-Usage-Tests ":/job \
103102 "devizervlad/crossplatform-pipeline:${{ matrix.os }}" \
104- bash -e lets-rock.sh
103+ bash -eu -o pipefail lets-rock.sh
105104
106105 - name : PREPARE Artifact
107106 run : |
108- sudo chown -R $(whoami) $HOME/Artifacts
109- cp $HOME/Artifacts/PRECISION.LOG /tmp/0
107+ # TRIM Show_Precision_Histogram ... Show_Precision_Histogram lines
108+ sudo chown -R $(whoami) $HOME/Cpu-Usage-Tests
109+ cp $HOME/Cpu-Usage-Tests/PRECISION.LOG /tmp/0
110110 # sed '0,/Show_Precision_Histogram/d' - it exclides matching line
111111 cat /tmp/0 | sed -n '/Show_Precision_Histogram/,$p' > /tmp/1
112112 tac /tmp/1 > /tmp/2
113113 cat /tmp/2 | sed -n '/Show_Precision_Histogram/,$p' > /tmp/3
114114 tac /tmp/3 > $HOME/Artifacts/PRECISION.LOG
115+ cat $HOME/Cpu-Usage-Tests/PRECISION.LOG
115116
116117 mkdir -p "${{ github.workspace }}/Artifact"
117- cp -f $HOME/Artifacts/PRECISION.LOG "${{ github.workspace }}/Artifact/PRECISION on ${{ matrix.os }} at ${{ matrix.host }}.LOG"
118- cat $HOME/Artifacts/PRECISION.LOG
118+ cp -f $HOME/Cpu-Usage-Tests/PRECISION.LOG "${{ github.workspace }}/Artifact/PRECISION on ${{ matrix.os }}.LOG"
119119
120120 - name : Upload artifacts
121121 uses : actions/upload-artifact@v4
122122 if : always()
123123 with :
124- name : ' Precision ${{ matrix.os }} at ${{ matrix.host }} '
124+ name : ' Precision ${{ matrix.os }}'
125125 path : ' ${{ github.workspace }}/Artifact'
126126
127127 TestCpuUsageonHost :
0 commit comments