Skip to content

Nightly Linux tests / LLVM trunk #1412

Nightly Linux tests / LLVM trunk

Nightly Linux tests / LLVM trunk #1412

# Copyright 2020-2024, Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
# Nightly Linux run.
name: Nightly Linux tests / LLVM trunk
permissions: read-all
# Run daily - test sse2-avx512 targets @ -O0/-O1/-O2
on:
schedule:
- cron: '0 7 * * *'
push:
branches:
- '**test_nightly**'
workflow_dispatch:
env:
SDE_MIRROR_ID: 813591
SDE_TAR_NAME: sde-external-9.33.0-2024-01-07
jobs:
# Building LLVM in docker, as using native Ubuntu 18.04 github-hosted image contains newer-than-expected libs and
# makes the resulting build not usable on other Ubuntu 18.04 images.
# Doing Linux build in two stages, as self-build is required, but Github Action runners are not always capable
# to finish the full job in less than 6 hours.
linux-build-llvm-trunk-1:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Check environment
run: |
cat /proc/cpuinfo
- name: Build LLVM
run: |
cd docker/ubuntu/18.04/cpu_ispc_build
docker buildx create --use
docker buildx build --tag ispc/ubuntu18.04:stage1 --target=llvm_build_step1 --cache-to=type=local,dest=cache.local --build-arg REPO=$GITHUB_REPOSITORY --build-arg SHA=$GITHUB_SHA --build-arg LLVM_VERSION=trunk .
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: llvm_trunk_linux_stage1_cache
path: docker/ubuntu/18.04/cpu_ispc_build/cache.local
linux-build-llvm-trunk-2:
needs: [linux-build-llvm-trunk-1]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Check environment
run: |
cat /proc/cpuinfo
- name: Download package
uses: actions/download-artifact@v4
with:
name: llvm_trunk_linux_stage1_cache
path: docker/ubuntu/18.04/cpu_ispc_build/cache.local
- name: Build LLVM
run: |
cd docker/ubuntu/18.04/cpu_ispc_build
ls -al
docker buildx create --use
docker buildx build --tag ispc/ubuntu18.04:stage2 --target=llvm_build_step2 --cache-from=type=local,src=cache.local --build-arg REPO=$GITHUB_REPOSITORY --build-arg SHA=$GITHUB_SHA --build-arg LLVM_VERSION=trunk --output=type=tar,dest=result.tar .
- name: Pack LLVM
run: |
cd docker/ubuntu/18.04/cpu_ispc_build
tar xvf result.tar usr/local/src/llvm
mv usr/local/src/llvm/bin-trunk .
# Note using gzip here, instead of xz - trading of space for speed, as it's just for passing to another stage.
tar czvf llvm-trunk-ubuntu18.04-Release+Asserts-x86.arm.wasm.tar.gz bin-trunk
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: llvm_trunk_linux
path: docker/ubuntu/18.04/cpu_ispc_build/llvm-trunk-ubuntu18.04-Release+Asserts-x86.arm.wasm.tar.gz
linux-build-ispc-llvm-trunk:
needs: [linux-build-llvm-trunk-2]
runs-on: ubuntu-latest
env:
LLVM_VERSION: "trunk"
LLVM_TAR: llvm-trunk-ubuntu18.04-Release+Asserts-x86.arm.wasm.tar.gz
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Download package
uses: actions/download-artifact@v4
with:
name: llvm_trunk_linux
- name: Install dependencies
run: |
.github/workflows/scripts/install-build-deps.sh
- name: Check environment
run: |
which -a clang
cat /proc/cpuinfo
- name: Build package
run: |
.github/workflows/scripts/build-ispc.sh
- name: Sanity testing (make check-all, make test)
run: |
.github/workflows/scripts/check-ispc.sh
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: ispc_llvm_trunk_linux
path: build/ispc-trunk-linux.tar.gz
linux-test-llvm-trunk:
needs: [linux-build-ispc-llvm-trunk]
runs-on: ubuntu-latest
continue-on-error: false
strategy:
fail-fast: false
matrix:
target: [sse2-i32x4, sse2-i32x8,
sse4-i8x16, sse4-i16x8, sse4-i32x4, sse4-i32x8,
avx1-i32x4, avx1-i32x8, avx1-i32x16, avx1-i64x4,
avx2-i8x32, avx2-i16x16, avx2-i32x4, avx2-i32x8, avx2-i32x16, avx2-i64x4,
avx512knl-x16,
avx512skx-x4, avx512skx-x8, avx512skx-x16, avx512skx-x64, avx512skx-x32]
steps:
- uses: actions/checkout@v4
- name: Download package
uses: actions/download-artifact@v4
with:
name: ispc_llvm_trunk_linux
- name: Install dependencies and unpack artifacts
run: |
.github/workflows/scripts/install-test-deps.sh
- name: Check environment
run: |
cat /proc/cpuinfo
- name: Running tests
run: |
echo PATH=$PATH
./alloy.py -r --only="stability current -O0 -O1 -O2" --only-targets="${{ matrix.target }}" --time --update-errors=FP
- name: Upload fail_db.txt
uses: actions/upload-artifact@v4
if: failure()
with:
name: fail_db.${{matrix.target}}.txt
path: fail_db.txt
- name: Check
run: |
# Print fails to the log.
git diff
# Exit with error code if there are fails.
[ -z "`git diff`" ]