build: add Linux GHA test step (#42460)
* build: add Linux GHA test step * Switch to medium AKS runners * Add missing BUILD_TYPE to restore-artifact * Fix untar to current dir * Remove known hosts logic * Add missing Node.js headers step * Fix for active SSH sessions * Fix storing artifacts * Build on x64 for test
This commit is contained in:
parent
75d0e725be
commit
30885e5f9f
3 changed files with 110 additions and 17 deletions
|
@ -1,24 +1,38 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "`uname`" == "Darwin" ]; then
|
||||
if [ -z "$MAS_BUILD" ]; then
|
||||
BUILD_TYPE="darwin"
|
||||
else
|
||||
BUILD_TYPE="mas"
|
||||
fi
|
||||
elif [ "`uname`" == "Linux" ]; then
|
||||
BUILD_TYPE="linux"
|
||||
fi
|
||||
|
||||
GENERATED_ARTIFACTS="generated_artifacts_${BUILD_TYPE}_${TARGET_ARCH}"
|
||||
|
||||
mv_if_exist() {
|
||||
if [ -f "generated_artifacts_${BUILD_TYPE}_${TARGET_ARCH}/$1" ] || [ -d "generated_artifacts_${BUILD_TYPE}_${TARGET_ARCH}/$1" ]; then
|
||||
if [ -f "${GENERATED_ARTIFACTS}/$1" ] || [ -d "${GENERATED_ARTIFACTS}/$1" ]; then
|
||||
echo Restoring $1 to $2
|
||||
mkdir -p $2
|
||||
mv generated_artifacts_${BUILD_TYPE}_${TARGET_ARCH}/$1 $2
|
||||
mv $GENERATED_ARTIFACTS/$1 $2
|
||||
else
|
||||
echo Skipping $1 - It is not present on disk
|
||||
fi
|
||||
}
|
||||
|
||||
untar_if_exist() {
|
||||
if [ -f "generated_artifacts_${BUILD_TYPE}_${TARGET_ARCH}/$1" ] || [ -d "generated_artifacts_${BUILD_TYPE}_${TARGET_ARCH}/$1" ]; then
|
||||
echo Restoring $1 to $2
|
||||
tar -xf generated_artifacts_${BUILD_TYPE}_${TARGET_ARCH}/$1 $2
|
||||
if [ -f "${GENERATED_ARTIFACTS}/$1" ] || [ -d "${GENERATED_ARTIFACTS}/$1" ]; then
|
||||
echo Restoring $1 to current directory
|
||||
tar -xf ${GENERATED_ARTIFACTS}/$1
|
||||
else
|
||||
echo Skipping $1 - It is not present on disk
|
||||
fi
|
||||
}
|
||||
|
||||
echo Restoring artifacts from $GENERATED_ARTIFACTS
|
||||
|
||||
# Restore generated artifacts
|
||||
mv_if_exist dist.zip src/out/Default
|
||||
mv_if_exist node_headers.tar.gz src/out/Default/gen
|
||||
|
@ -30,4 +44,4 @@ mv_if_exist hunspell_dictionaries.zip src/out/Default
|
|||
mv_if_exist cross-arch-snapshots src
|
||||
|
||||
# Restore build artifacts
|
||||
untar_if_exist build_artifacts.tar ./
|
||||
untar_if_exist build_artifacts.tar
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue