Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #208
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
name: CI | |
on: [push, pull_request] | |
env: | |
RELEASE_VERSION: "21.10" | |
RELEASE_LLVM: "14" | |
jobs: | |
check-format: | |
name: Check formatting | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Install dependencies | |
run: sudo apt-get install -y clang-format | |
- name: Check formatting | |
run: bash .github/workflows/check-format.sh | |
build: | |
name: Build ${{ matrix.os }} llvm-${{ matrix.llvm }} ${{ matrix.compiler }} ${{ matrix.build_type }} | |
runs-on: ${{ matrix.os }} | |
needs: [check-format] | |
env: | |
LLVM_VERSION: ${{ matrix.llvm }} | |
INSTALL_DIR: "${{ github.workspace }}/install" | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, macos-11.0] | |
compiler: [gcc, clang] | |
build_type: [Release, Debug] | |
llvm: [12, 13, 14] | |
exclude: | |
- os: macos-11.0 | |
llvm: 13 | |
- os: macos-11.0 | |
compiler: gcc | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: bash .github/workflows/install-deps.sh | |
- name: Set LLVM_DIR | |
shell: bash | |
run: | | |
if [[ "${{ matrix.os }}" =~ ubuntu-.* ]]; then | |
echo LLVM_DIR=/usr/lib/llvm-${{ matrix.llvm }}/lib/cmake/llvm >>$GITHUB_ENV | |
elif [[ "${{ matrix.os }}" =~ macos-.* ]]; then | |
echo LLVM_DIR=$PWD/llvm-${LLVM_VERSION}/lib/cmake/llvm >>$GITHUB_ENV | |
fi | |
- name: Set compiler | |
shell: bash | |
run: | | |
if [ "${{ matrix.compiler }}" == "gcc" ]; then | |
echo CC=gcc >>$GITHUB_ENV | |
echo CXX=g++ >>$GITHUB_ENV | |
elif [ "${{ matrix.compiler }}" == "clang" ]; then | |
echo CC=clang >>$GITHUB_ENV | |
echo CXX=clang++ >>$GITHUB_ENV | |
fi | |
- name: Create build dir | |
run: cmake -E make_directory build | |
- name: CMake | |
run: > | |
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \ | |
-DLLVM_DIR="$LLVM_DIR" | |
working-directory: build | |
- name: Build | |
run: cmake --build . --config ${{ matrix.build_type }} | |
working-directory: build | |
- name: Test | |
run: ctest -C ${{ matrix.build_type }} --output-on-failure | |
working-directory: build | |
- name: Install | |
run: cmake --install . --config ${{ matrix.build_type }} | |
working-directory: build | |
- name: Prepare build artifact | |
shell: bash | |
run: | | |
if [[ "${{ matrix.os }}" =~ ubuntu-.* ]]; then | |
cp src/install/INSTALL.linux ${INSTALL_DIR} | |
elif [[ "${{ matrix.os }}" =~ macos-.* ]]; then | |
cp src/install/INSTALL.darwin ${INSTALL_DIR} | |
fi | |
mv ${INSTALL_DIR} oclgrind-${RELEASE_VERSION} | |
mkdir -p artifact | |
tar czf artifact/oclgrind-${RELEASE_VERSION}.tgz oclgrind-${RELEASE_VERSION} | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Oclgrind-${{ env.RELEASE_VERSION }}-${{ matrix.os }}-llvm${{ matrix.llvm }}-${{ matrix.build_type }}-${{ matrix.compiler }} | |
path: artifact | |
build-windows: | |
name: Build ${{ matrix.platform }} llvm-${{ matrix.llvm }} | |
runs-on: windows-2019 | |
needs: [check-format] | |
env: | |
LLVM_VERSION: ${{ matrix.llvm }} | |
BUILD_PLATFORM: ${{ matrix.platform }} | |
strategy: | |
matrix: | |
platform: [Win32, x64] | |
llvm: [12, 13, 14] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: cache-llvm | |
uses: actions/cache@v2 | |
with: | |
path: llvm-${{ matrix.llvm }} | |
key: llvm-${{ matrix.llvm }}-${{ matrix.platform }} | |
- name: Install dependencies | |
run: bash .github/workflows/install-deps.sh | |
- name: Create build dir | |
run: cmake -E make_directory build | |
- name: CMake | |
shell: bash | |
run: > | |
cmake .. -G "Visual Studio 16 2019" -A ${{ matrix.platform }} | |
-DLLVM_DIR=$PWD/../llvm-${{ matrix.llvm }}/install/lib/cmake/llvm | |
-DCMAKE_INSTALL_PREFIX=$PWD/../install/ | |
working-directory: build | |
- name: Build | |
run: cmake --build . --config Release --target ALL_BUILD | |
working-directory: build | |
- name: Test | |
run: > | |
cmake --build . --config Release --target RUN_TESTS ; | |
cat ./Testing/Temporary/LastTest.log | |
working-directory: build | |
- name: Install | |
run: cmake --build . --config Release --target INSTALL | |
working-directory: build | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Oclgrind-${{ env.RELEASE_VERSION }}-Windows-${{ matrix.platform }}-llvm${{ matrix.llvm }} | |
path: install | |
retention-days: 5 | |
upload-windows-binaries: | |
name: Upload Windows binaries | |
runs-on: ubuntu-20.04 | |
needs: [build-windows] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: Oclgrind-${{ env.RELEASE_VERSION }}-Windows-Win32-llvm${{ env.RELEASE_LLVM }} | |
path: artifact/oclgrind-${{ env.RELEASE_VERSION }}/x86 | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: Oclgrind-${{ env.RELEASE_VERSION }}-Windows-x64-llvm${{ env.RELEASE_LLVM }} | |
path: artifact/oclgrind-${{ env.RELEASE_VERSION }}/x64 | |
- name: Prepare directory | |
shell: bash | |
run: | | |
outdir=artifact/oclgrind-${{ env.RELEASE_VERSION }} | |
cp src/install/INSTALL.windows $outdir/INSTALL.txt | |
cp src/install/install.bat $outdir/ | |
cp src/install/uninstall.bat $outdir/ | |
cp src/install/oclgrind-icd.reg $outdir/ | |
mkdir $outdir/include | |
mv $outdir/x64/include/CL $outdir/include/ | |
cp -r $outdir/x64/include/oclgrind $outdir/include/ | |
rm -rf $outdir/include/oclgrind/*.pch | |
rm -rf $outdir/x86/include/CL | |
- name: Upload binaries | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Oclgrind-${{ env.RELEASE_VERSION }}-Windows | |
path: artifact | |
build-cts: | |
name: Build OpenCL CTS | |
runs-on: ubuntu-20.04 | |
needs: [build] | |
env: | |
cts_hash: 92285f7c9de965ddc41e7dfaaab8c7c75aa55dbe | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
id: cache-cts | |
with: | |
path: opencl-cts | |
key: opencl-cts-${{ env.cts_hash }} | |
- name: Install dependencies | |
if: steps.cache-cts.outputs.cache-hit != 'true' | |
run: bash .github/workflows/install-deps.sh | |
- uses: actions/checkout@v2 | |
if: steps.cache-cts.outputs.cache-hit != 'true' | |
with: | |
repository: KhronosGroup/OpenCL-CTS | |
path: opencl-cts | |
ref: ${{ env.cts_hash }} | |
- uses: actions/checkout@v2 | |
if: steps.cache-cts.outputs.cache-hit != 'true' | |
with: | |
repository: KhronosGroup/OpenCL-Headers | |
path: opencl-cts/opencl-headers | |
- uses: actions/checkout@v2 | |
if: steps.cache-cts.outputs.cache-hit != 'true' | |
with: | |
repository: KhronosGroup/OpenCL-ICD-Loader | |
path: opencl-cts/opencl-icd-loader | |
- name: Create ICD loader build dir | |
run: cmake -E make_directory opencl-cts/opencl-icd-loader/build | |
- name: CMake ICD Loader | |
if: steps.cache-cts.outputs.cache-hit != 'true' | |
run: > | |
cmake .. \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX=$PWD/../../install \ | |
-DOPENCL_ICD_LOADER_HEADERS_DIR=$PWD/../../opencl-headers | |
working-directory: opencl-cts/opencl-icd-loader/build | |
- name: Build ICD Loader | |
if: steps.cache-cts.outputs.cache-hit != 'true' | |
run: > | |
cmake --build . && cmake --install . | |
working-directory: opencl-cts/opencl-icd-loader/build | |
- name: Create CTS build dir | |
run: cmake -E make_directory opencl-cts/build | |
- name: CMake CTS | |
if: steps.cache-cts.outputs.cache-hit != 'true' | |
run: > | |
cmake .. \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX=$PWD/../install \ | |
-DCL_INCLUDE_DIR=$PWD/../opencl-headers \ | |
-DCL_LIB_DIR=$PWD/../install/lib \ | |
-DCL_LIBCLCXX_DIR=. \ | |
-DCLConform_LIBRARIES=OpenCL | |
working-directory: opencl-cts/build | |
- name: Build CTS | |
if: steps.cache-cts.outputs.cache-hit != 'true' | |
run: cmake --build . | |
working-directory: opencl-cts/build | |
run-cts: | |
name: Run OpenCL CTS ${{ matrix.suite[0] }} | |
runs-on: ubuntu-20.04 | |
needs: [build-cts] | |
env: | |
cts_hash: 92285f7c9de965ddc41e7dfaaab8c7c75aa55dbe | |
strategy: | |
fail-fast: false | |
matrix: | |
suite: [ | |
[allocations], | |
[api], | |
[atomics], | |
[basic], | |
[buffers], | |
[commonfns], | |
[compiler], | |
[computeinfo], | |
[contractions], | |
[conversions, "-w -[4096]"], | |
[events], | |
[geometrics], | |
[images_clCopyImage], | |
[images_clFillImage], | |
[images_clGetInfo], | |
[images_clReadWriteImage], | |
[images_kernel_image_methods], | |
[images_kernel_read_write, read write small_images CL_FILTER_NEAREST CL_RGBA], # TODO: Enable all orders. | |
[images_samplerlessReads], | |
[half, -w], | |
#[integer_ops], # TODO: Fix crash. | |
#[math_brute_force, -w -m], # TODO: Fix crash when multi-threaded and access-when-mapped issue in CTS. | |
[mem_host_flags], | |
[multiple_device_context], | |
[printf], | |
[profiling], | |
[relationals], | |
[select, -w], | |
#[thread_dimensions], # TODO: Takes too long. | |
[vectors], | |
] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: > | |
LLVM_VERSION=${{ env.RELEASE_LLVM }} \ | |
bash .github/workflows/install-deps.sh | |
- name: Download Oclgrind | |
uses: actions/download-artifact@v4.1.7 | |
with: | |
name: Oclgrind-${{ env.RELEASE_VERSION }}-ubuntu-20.04-llvm${{ env.RELEASE_LLVM }}-Release-gcc | |
- name: Unpack Oclgrind | |
shell: bash | |
run: | | |
tar xf oclgrind-${RELEASE_VERSION}.tgz | |
- name: cache-cts | |
uses: actions/cache@v2 | |
with: | |
path: opencl-cts | |
key: opencl-cts-${{ env.cts_hash }} | |
- name: Run CTS suite | |
run: bash .github/workflows/run-cts-suite.sh ${{ matrix.suite[0] }} ${{ matrix.suite[1] }} |