Skip to content

fix

fix #872

Workflow file for this run

# for github runner images, see: https://github.com/actions/runner-images?tab=readme-ov-file#available-images
name: interpret-CI
on:
push:
pull_request:
workflow_dispatch:
inputs:
commit_id:
description: 'Commit ID (optional)'
required: false
schedule:
- cron: "0 12 * * *"
jobs:
bld:
strategy:
matrix:
include:
- name: linux_release_64
image: ubuntu-20.04
options: "-release_64"
asm: "-asm"
- name: linux_debug_64
image: ubuntu-20.04
options: "-debug_64"
asm: ""
- name: mac_release_64
image: macos-13 # macos-13 is an intel based mac
options: "-release_64"
asm: "-asm"
- name: mac_debug_64
image: macos-13 # macos-13 is an intel based mac
options: "-debug_64"
asm: ""
- name: mac_release_arm
image: macos-14 # macos-14 is an ARM based mac
options: "-release_arm"
asm: "-asm"
- name: mac_debug_arm
image: macos-14 # macos-14 is an ARM based mac
options: "-debug_arm"
asm: ""
- name: win_release_64
image: windows-2022
options: "-release_64"
asm: ""
- name: win_debug_64
image: windows-2022
options: "-debug_64"
asm: ""
runs-on: ${{ matrix.image }}
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}
- name: Build on Windows
if: startsWith(matrix.image, 'windows')
run: |
$env:PATH += ';C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin'
$env:CudaToolkitDir = 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2'
python -c "from urllib.request import urlretrieve; urlretrieve('https://developer.download.nvidia.com/compute/cuda/11.2.2/network_installers/cuda_11.2.2_win10_network.exe', 'cuda_11.2.2_win10_network.exe')"
./cuda_11.2.2_win10_network.exe -s nvcc_11.2 visual_studio_integration_11.2 cudart_11.2
if ($LASTEXITCODE -ne 0) {
Write-Error "cuda_11.2.2_win10_network.exe FAILED"
exit 201
}
./build.bat ${{ matrix.options }} ${{ matrix.asm }}
- name: Build on Linux
if: startsWith(matrix.image, 'ubuntu')
run: |
sudo apt --yes update
sudo apt --yes install nvidia-cuda-toolkit
/bin/sh ./build.sh ${{ matrix.options }} ${{ matrix.asm }}
- name: Build on macOS
if: startsWith(matrix.image, 'macos')
run: |
/bin/sh ./build.sh ${{ matrix.options }} ${{ matrix.asm }}
- name: Publish shared library
uses: actions/upload-artifact@v4
with:
name: libebm_${{ matrix.name }}
path: bld/lib
- name: Publish assembly
if: ${{ matrix.asm != '' }}
uses: actions/upload-artifact@v4
with:
name: asm_${{ matrix.name }}
path: bld/asm/
testC:
needs: [bld]
strategy:
matrix:
include:
- name: linux_release_64
image: ubuntu-latest
options: "-release_64"
existing: "-existing_release_64"
scheduled: "-valgrind"
- name: linux_debug_64
image: ubuntu-latest
options: "-debug_64"
existing: "-existing_debug_64"
scheduled: "-valgrind"
# - name: linux_release_32
# image: ubuntu-latest
# options: "-release_32"
# existing: ""
# scheduled: "-valgrind"
# - name: linux_debug_32
# image: ubuntu-latest
# options: "-debug_32"
# existing: ""
# scheduled: "-valgrind"
runs-on: ${{ matrix.image }}
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Download libebm artifact
if: ${{ matrix.existing != '' }}
uses: actions/download-artifact@v4
with:
name: libebm_${{ matrix.name }}
path: bld/lib
- name: mac test_native
if: ${{ startsWith(matrix.image, 'macos') }}
run: |
/bin/sh ./shared/libebm/tests/libebm_test.sh ${{ matrix.options }} ${{ matrix.existing }}
- name: linux test_native (Schedule)
if: ${{ startsWith(matrix.image, 'ubuntu') }}
run: |
/bin/sh ./shared/libebm/tests/libebm_test.sh ${{ matrix.options }} ${{ matrix.existing }} ${{ matrix.scheduled }}
- name: win test_native (Schedule)
if: ${{ startsWith(matrix.image, 'windows') }}
run: |
$env:PATH += ';C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin'
./shared/libebm/tests/libebm_test.bat ${{ matrix.options }} ${{ matrix.existing }} ${{ matrix.scheduled }}