Clean Build #1815
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: Clean Build | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on all push or pull request events | |
push: | |
pull_request: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
# added using https://github.com/step-security/secure-repo | |
permissions: | |
contents: read | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
check_disabled_actions: | |
name: Check | |
uses: ./.github/workflows/_check_disabled_actions.yml | |
build: | |
needs: check_disabled_actions | |
if: needs.check_disabled_actions.outputs.should_continue == 'true' | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
env: | |
COMPILER: ${{ matrix.compiler }} | |
TAR_CMD: tar_nosuid | |
GHA_OS: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04] | |
compiler: ['gcc', 'clang', 'gcc-9', 'gcc-10', 'clang-9', 'clang-10'] | |
include: | |
- os: ubuntu-22.04 | |
compiler: 'gcc-i386-cross' | |
- os: ubuntu-22.04 | |
compiler: 'clang-i386-cross' | |
- os: ubuntu-22.04 | |
compiler: 'gcc-mips64-cross' | |
- os: ubuntu-22.04 | |
compiler: 'gcc-arm32-cross' | |
- os: ubuntu-22.04 | |
compiler: 'gcc-arm64-cross' | |
- os: ubuntu-22.04 | |
compiler: 'gcc' | |
- os: ubuntu-22.04 | |
compiler: 'clang' | |
- os: ubuntu-22.04 | |
compiler: 'gcc-11' | |
- os: ubuntu-22.04 | |
compiler: 'gcc-12' | |
- os: ubuntu-22.04 | |
compiler: 'clang-11' | |
- os: ubuntu-22.04 | |
compiler: 'clang-12' | |
- os: ubuntu-22.04 | |
compiler: 'clang-13' | |
- os: ubuntu-22.04 | |
compiler: 'clang-14' | |
- os: ubuntu-22.04 | |
compiler: 'clang-15' | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Start Docker container | |
if: endsWith(matrix.compiler, '-cross') | |
run: sh -x scripts/build/start_container.sh | |
# - name: Sanitize list of Ubuntu mirrors | |
# if: endsWith(matrix.compiler, '-cross') == 0 | |
# run: scripts/ft-apt-spy2-check-and-fix.sh | |
- name: Workaround for tar not being able to access /var/cache/apt/archives | |
if: endsWith(matrix.compiler, '-cross') == 0 | |
run: | | |
sudo cp "$(command -v tar)" "$(command -v tar)"_nosuid | |
sudo chmod u+s "$(command -v tar)" | |
# Cache the apt-get packages | |
- name: Cache apt-get packages | |
if: endsWith(matrix.compiler, '-cross') == 0 | |
uses: actions/cache@v3 | |
with: | |
path: /var/cache/apt/archives | |
key: cleanbuild-${{ matrix.os }}-apt-get-${{ github.run_id }} | |
restore-keys: | | |
cleanbuild-${{ matrix.os }}-apt-get | |
cleanbuild-${{ matrix.os }}-${{ matrix.compiler }}-apt-get | |
- name: Install apt-get updates | |
run: scripts/ft-apt-get-update.sh | |
- name: Set up Python | |
if: endsWith(matrix.compiler, '-cross') == 0 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.9 | |
- name: install_depends | |
run: sh -x scripts/build/install_depends.sh | |
- name: build | |
run: sh -x ./scripts/do-build.sh cleanbuild |