[CI] Check binary size
This commit is contained in:
3
.github/workflows/Linux_build.yml
vendored
3
.github/workflows/Linux_build.yml
vendored
@@ -87,6 +87,9 @@ jobs:
|
|||||||
- name: Prepare artifacts
|
- name: Prepare artifacts
|
||||||
id: prepare_artifacts
|
id: prepare_artifacts
|
||||||
run: |
|
run: |
|
||||||
|
if [ $(stat -c %s build/bin/Linux/Release/xenia_canary) -le 100000 ]; then
|
||||||
|
echo "::error::Binary is too small."
|
||||||
|
fi
|
||||||
mkdir -p artifacts
|
mkdir -p artifacts
|
||||||
cp -r build/bin/Linux/Release/xenia_canary LICENSE artifacts
|
cp -r build/bin/Linux/Release/xenia_canary LICENSE artifacts
|
||||||
- name: Upload xenia canary artifacts
|
- name: Upload xenia canary artifacts
|
||||||
|
|||||||
5
.github/workflows/Windows_build.yml
vendored
5
.github/workflows/Windows_build.yml
vendored
@@ -75,6 +75,11 @@ jobs:
|
|||||||
- name: Prepare artifacts
|
- name: Prepare artifacts
|
||||||
id: prepare_artifacts
|
id: prepare_artifacts
|
||||||
run: |
|
run: |
|
||||||
|
foreach ($file in 'build\bin\Windows\Release\xenia_canary.exe','build\bin\Windows\Release\xenia_canary.pdb') {
|
||||||
|
if ((get-item $file).Length -le 100000) {
|
||||||
|
echo "::error::$file is too small."
|
||||||
|
}
|
||||||
|
}
|
||||||
robocopy . build\bin\Windows\Release LICENSE /r:0 /w:0
|
robocopy . build\bin\Windows\Release LICENSE /r:0 /w:0
|
||||||
robocopy build\bin\Windows\Release artifacts\xenia_canary xenia_canary.exe xenia_canary.pdb LICENSE /r:0 /w:0
|
robocopy build\bin\Windows\Release artifacts\xenia_canary xenia_canary.exe xenia_canary.pdb LICENSE /r:0 /w:0
|
||||||
If ($LastExitCode -le 7) { echo "LastExitCode = $LastExitCode";$LastExitCode = 0 }
|
If ($LastExitCode -le 7) { echo "LastExitCode = $LastExitCode";$LastExitCode = 0 }
|
||||||
|
|||||||
Reference in New Issue
Block a user