2023-11-08 15:29:41 +00:00
|
|
|
name: Common setup
|
|
|
|
description: Setup necessary environments
|
|
|
|
inputs:
|
|
|
|
job_type:
|
|
|
|
description: the name to use in the TEMP_PATH and REPO_COPY
|
|
|
|
default: common
|
|
|
|
type: string
|
|
|
|
nested_job:
|
|
|
|
description: the fuse for unintended use inside of the reusable callable jobs
|
|
|
|
default: true
|
|
|
|
type: boolean
|
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
|
|
|
- name: Setup and check ENV
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
echo "Setup the common ENV variables"
|
|
|
|
cat >> "$GITHUB_ENV" << 'EOF'
|
|
|
|
TEMP_PATH=${{runner.temp}}/${{inputs.job_type}}
|
|
|
|
EOF
|
|
|
|
if [ -z "${{env.GITHUB_JOB_OVERRIDDEN}}" ] && [ "true" == "${{inputs.nested_job}}" ]; then
|
|
|
|
echo "The GITHUB_JOB_OVERRIDDEN ENV is unset, and must be set for the nested jobs"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
- name: Setup $TEMP_PATH
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
# to remove every leftovers
|
2023-12-18 08:07:22 +00:00
|
|
|
sudo rm -fr "$TEMP_PATH" && mkdir -p "$TEMP_PATH"
|
2024-05-18 10:54:23 +00:00
|
|
|
- name: Tune vm.mmap_rnd_bits for sanitizers
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
sudo sysctl vm.mmap_rnd_bits
|
|
|
|
# https://github.com/google/sanitizers/issues/856
|
|
|
|
echo "Tune vm.mmap_rnd_bits for sanitizers"
|
|
|
|
sudo sysctl vm.mmap_rnd_bits=28
|