-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Various fixes & improvements for Windows CI/CD
This commit marks version 0.23.2 (see #14). * Fix incorrect cuda_version reference and order of CUDA version / CC columns in table generated on the release notes * Fix mfaktc.ini copy on Windows CI/CI builds: Github Actions running an unusual environment for Windows builds, where GNU Make has SHELL set to PowerShell (in other case GNU Make from MSYS2 installed will try to launch bash shell which fails to build without heavy modifications to the Makefile). And for some reason make fails to spawn "copy" command, probably because it's just a shortcut from Copy-Item command name. Anyways, simply copying this file to upper dir before launching make fixes this issue, because Make will skip this step as completed previously. This way we don't have to patch Makefile.win or invent other tricks. * Changes suggested by @tdulcet on #14 added. Thanks! These include: * Set action fail-fast to false. This allows other job continue if one fails. * Commented out CUDA versions to leave only one highest .patch per major.minor. * "Code quality" improvements to workflow & helper script.
- Loading branch information
Showing
3 changed files
with
59 additions
and
46 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,36 +11,41 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. | ||
fail-fast: true | ||
# When fail-fast set to true, if one job fails, all others within the same | ||
# matrix (i.e. Linux or Windows builds) will be aborted at the same time. | ||
fail-fast: false | ||
|
||
matrix: | ||
sys: | ||
# Specified version combination must exist as CUDA container image from NVidia: nvcr.io/nvidia/cuda:${{ matrix.sys.cuda_version }}-devel-${{ matrix.sys.ct_os }} | ||
# Available versions can be found here: https://catalog.ngc.nvidia.com/orgs/nvidia/containers/cuda/tags (note that only Ubuntus are supported by this action) | ||
- { cuda_version: '12.8.0', ct_os: 'ubuntu24.04' } | ||
- { cuda_version: '12.6.3', ct_os: 'ubuntu22.04' } | ||
- { cuda_version: '12.6.2', ct_os: 'ubuntu22.04' } | ||
- { cuda_version: '12.6.1', ct_os: 'ubuntu22.04' } | ||
- { cuda_version: '12.6.0', ct_os: 'ubuntu22.04' } | ||
# - { cuda_version: '12.6.2', ct_os: 'ubuntu22.04' } | ||
# - { cuda_version: '12.6.1', ct_os: 'ubuntu22.04' } | ||
# - { cuda_version: '12.6.0', ct_os: 'ubuntu22.04' } | ||
- { cuda_version: '12.5.1', ct_os: 'ubuntu22.04' } | ||
- { cuda_version: '12.5.0', ct_os: 'ubuntu22.04' } | ||
# - { cuda_version: '12.5.0', ct_os: 'ubuntu22.04' } | ||
- { cuda_version: '12.4.1', ct_os: 'ubuntu22.04' } | ||
- { cuda_version: '12.4.0', ct_os: 'ubuntu22.04' } | ||
# - { cuda_version: '12.4.0', ct_os: 'ubuntu22.04' } | ||
- { cuda_version: '12.3.2', ct_os: 'ubuntu22.04' } | ||
- { cuda_version: '12.3.1', ct_os: 'ubuntu22.04' } | ||
- { cuda_version: '12.3.0', ct_os: 'ubuntu22.04' } | ||
# - { cuda_version: '12.3.1', ct_os: 'ubuntu22.04' } | ||
# - { cuda_version: '12.3.0', ct_os: 'ubuntu22.04' } | ||
- { cuda_version: '12.2.2', ct_os: 'ubuntu22.04' } | ||
- { cuda_version: '12.2.0', ct_os: 'ubuntu22.04' } | ||
# - { cuda_version: '12.2.0', ct_os: 'ubuntu22.04' } | ||
- { cuda_version: '12.1.1', ct_os: 'ubuntu22.04' } | ||
- { cuda_version: '12.1.0', ct_os: 'ubuntu22.04' } | ||
# - { cuda_version: '12.1.0', ct_os: 'ubuntu22.04' } | ||
- { cuda_version: '12.0.1', ct_os: 'ubuntu22.04' } | ||
- { cuda_version: '12.0.0', ct_os: 'ubuntu22.04' } | ||
# - { cuda_version: '12.0.0', ct_os: 'ubuntu22.04' } | ||
- { cuda_version: '11.8.0', ct_os: 'ubuntu22.04' } | ||
- { cuda_version: '11.7.1', ct_os: 'ubuntu22.04' } | ||
# - { cuda_version: '11.7.0', ct_os: 'ubuntu22.04' } | ||
- { cuda_version: '11.6.2', ct_os: 'ubuntu20.04' } | ||
- { cuda_version: '11.6.1', ct_os: 'ubuntu20.04' } | ||
# - { cuda_version: '11.6.1', ct_os: 'ubuntu20.04' } | ||
# - { cuda_version: '11.6.0', ct_os: 'ubuntu20.04' } | ||
- { cuda_version: '11.5.2', ct_os: 'ubuntu20.04' } | ||
# - { cuda_version: '11.5.1', ct_os: 'ubuntu20.04' } | ||
# - { cuda_version: '11.5.0', ct_os: 'ubuntu20.04' } | ||
- { cuda_version: '11.4.3', ct_os: 'ubuntu20.04' } | ||
- { cuda_version: '11.3.1', ct_os: 'ubuntu20.04' } | ||
- { cuda_version: '11.2.2', ct_os: 'ubuntu20.04' } | ||
|
@@ -76,17 +81,16 @@ jobs: | |
id: packages | ||
env: | ||
SCRIPT: | | ||
apt update | ||
apt -y full-upgrade | ||
apt install -y build-essential curl git make python3 sudo unzip wget zip | ||
apt-get update | ||
apt-get -y full-upgrade | ||
apt-get install -y build-essential curl git make python3 sudo unzip wget zip | ||
run: docker exec build-container bash -c "$SCRIPT" | ||
|
||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Prepare sources and gather info | ||
id: prepare | ||
shell: bash | ||
env: | ||
SCRIPT: | | ||
cd /workspace | ||
|
@@ -106,7 +110,7 @@ jobs: | |
cd /workspace | ||
zip -9 -j ${{ env.base_name }}.zip * | ||
echo "[${{ env.base_name }}.zip](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/${{ env.base_name }}.zip) | \ | ||
${{ matrix.sys.os.cuda_version }} | ${{ steps.prepare.outputs.CC_MIN }}-${{ steps.prepare.outputs.CC_MAX }} | ${{ steps.prepare.outputs.OS_VER }} | \ | ||
${{ matrix.sys.cuda_version }} | ${{ steps.prepare.outputs.CC_MIN }}-${{ steps.prepare.outputs.CC_MAX }} | ${{ steps.prepare.outputs.OS_VER }} | \ | ||
${{ steps.prepare.outputs.COMPILER_VER }} | ${{ steps.prepare.outputs.NVCC_VER }}" > ${{ env.base_name }}.txt | ||
run: docker exec build-container bash -c "$SCRIPT" | ||
|
||
|
@@ -122,8 +126,9 @@ jobs: | |
runs-on: ${{ matrix.sys.os }} | ||
|
||
strategy: | ||
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. | ||
fail-fast: true | ||
# When fail-fast set to true, if one job fails, all others within the same | ||
# matrix (i.e. Linux or Windows builds) will be aborted at the same time. | ||
fail-fast: false | ||
|
||
matrix: | ||
# Available version can be viewed at the Jimver/cuda-toolkit action sources: | ||
|
@@ -138,7 +143,7 @@ jobs: | |
- { cuda_version: '12.1.1', os: 'windows-2022' } | ||
- { cuda_version: '12.0.1', os: 'windows-2022' } | ||
- { cuda_version: '11.8.0', os: 'windows-2022' } | ||
- { cuda_version: '11.7.0', os: 'windows-2022' } | ||
- { cuda_version: '11.7.1', os: 'windows-2022' } | ||
- { cuda_version: '11.6.2', os: 'windows-2022' } | ||
- { cuda_version: '11.5.2', os: 'windows-2022' } | ||
- { cuda_version: '11.4.4', os: 'windows-2022' } | ||
|
@@ -178,6 +183,7 @@ jobs: | |
run: | | ||
& 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1' -Arch amd64 -HostArch amd64 | ||
cd "${{ github.workspace }}\src" | ||
Copy-Item mfaktc.ini .. | ||
make SHELL="powershell.exe" -f Makefile.win | ||
# MSVC 2019 on Windows 2019 has similar script, but it doesn't allows setting arch & host_arch and defaults to x86 (32 bit) env. | ||
|
@@ -187,15 +193,15 @@ jobs: | |
if: ${{ matrix.sys.os == 'windows-2019' }} | ||
shell: cmd | ||
run: | | ||
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" & cd src & make SHELL="powershell.exe" -f Makefile.win | ||
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" & cd src & copy mfaktc.ini .. & make SHELL="powershell.exe" -f Makefile.win | ||
- name: Prepare build archive with description | ||
shell: bash | ||
run: | | ||
choco install -y --no-progress zip | ||
zip -9 -j "${{ env.base_name }}.zip" * | ||
echo "[${{ env.base_name }}.zip](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/${{ env.base_name }}.zip) | \ | ||
${{ matrix.sys.os.cuda_version }} | ${{ steps.prepare.outputs.CC_MIN }}-${{ steps.prepare.outputs.CC_MAX }} | ${{ steps.prepare.outputs.OS_VER }} | \ | ||
${{ matrix.sys.cuda_version }} | ${{ steps.prepare.outputs.CC_MIN }}-${{ steps.prepare.outputs.CC_MAX }} | ${{ steps.prepare.outputs.OS_VER }} | \ | ||
${{ steps.prepare.outputs.COMPILER_VER }} | ${{ steps.prepare.outputs.NVCC_VER }}" > ${{ env.base_name }}.txt | ||
- name: Upload build artifacts | ||
|
@@ -222,16 +228,20 @@ jobs: | |
- name: Prepare list of release files & release notes | ||
id: makeinfo | ||
run: | | ||
echo "Binary releases (automated builds) below." > RELEASE_NOTES.txt | ||
echo "Compute Capability (CC) in the table means minimum and maximum versions supported." >> RELEASE_NOTES.txt | ||
echo "CC versions are listed without the dot (i.e. 90 means 9.0 compute capability)." >> RELEASE_NOTES.txt | ||
echo >> RELEASE_NOTES.txt | ||
echo "File | Compute Capability | CUDA version | Build OS | Compiler version | NVCC version" >> RELEASE_NOTES.txt | ||
echo "--- | --- | --- | --- | --- | ---" >> RELEASE_NOTES.txt | ||
cat mfaktc-${{ github.ref_name }}-*-cuda*/mfaktc-${{ github.ref_name }}-*-cuda*.txt | sort -Vr >> RELEASE_NOTES.txt | ||
echo 'RELEASE_FILES<<EOF' > $GITHUB_OUTPUT | ||
ls -1 mfaktc-${{ github.ref_name }}-*-cuda*/mfaktc-${{ github.ref_name }}-*-cuda*.zip | sort -Vr >> $GITHUB_OUTPUT | ||
echo 'EOF' >> $GITHUB_OUTPUT | ||
{ | ||
echo "Binary releases (automated builds) below." | ||
echo "Compute Capability (CC) in the table means minimum and maximum versions supported." | ||
echo "CC versions are listed without the dot (i.e. 90 means 9.0 compute capability)." | ||
echo | ||
echo "File | CUDA version | Compute Capability | Build OS | Compiler version | NVCC version" | ||
echo "--- | --- | --- | --- | --- | ---" | ||
sort -Vr mfaktc-${{ github.ref_name }}-*-cuda*/mfaktc-${{ github.ref_name }}-*-cuda*.txt | ||
} > RELEASE_NOTES.txt | ||
{ | ||
echo 'RELEASE_FILES<<EOF' | ||
printf '%s\n' mfaktc-${{ github.ref_name }}-*-cuda*/mfaktc-${{ github.ref_name }}-*-cuda*.zip | sort -Vr | ||
echo 'EOF' | ||
} > $GITHUB_OUTPUT | ||
- name: Make and upload release | ||
uses: softprops/[email protected] | ||
|
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 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