-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub CI: Start working on getting a Windows CI working
Signed-off-by: Michael Jackson <[email protected]>
- Loading branch information
1 parent
d4f6f91
commit d782432
Showing
5 changed files
with
371 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
REM SPDX-FileCopyrightText: 2022 Intel Corporation | ||
REM | ||
REM SPDX-License-Identifier: MIT | ||
|
||
set LANGUAGE=%1 | ||
set VS_VER=%2 | ||
set SAMPLES_TAG=%3 | ||
|
||
IF "%VS_VER%"=="2017_build_tools" ( | ||
@call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvars64.bat" | ||
) ELSE ( | ||
IF "%VS_VER%"=="2019_build_tools" ( | ||
@call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat" | ||
) ELSE ( | ||
@call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat" %VS_VER% | ||
) | ||
) | ||
|
||
for /f "tokens=* usebackq" %%f in (`dir /b "C:\Program Files (x86)\Intel\oneAPI\compiler\" ^| findstr /V latest ^| sort`) do @set "LATEST_VERSION=%%f" | ||
@call "C:\Program Files (x86)\Intel\oneAPI\compiler\%LATEST_VERSION%\env\vars.bat" | ||
|
||
git clone --depth 1 --branch %SAMPLES_TAG% https://github.com/oneapi-src/oneAPI-samples.git | ||
|
||
if "%LANGUAGE%" == "c++" goto cpp | ||
if "%LANGUAGE%" == "fortran" goto fortran | ||
if "%LANGUAGE%" == "dpc++" goto dpcpp | ||
goto exit | ||
|
||
|
||
:fortran | ||
cd oneAPI-samples\DirectProgramming\Fortran\CombinationalLogic\openmp-primes | ||
ifort -O2 -fpp /Qopenmp src\openmp_sample.f90 | ||
openmp_sample.exe | ||
set RESULT=%ERRORLEVEL% | ||
ifx -O2 -fpp /Qopenmp src\openmp_sample.f90 | ||
openmp_sample.exe | ||
set /a RESULT=%RESULT%+%ERRORLEVEL% | ||
goto exit | ||
|
||
|
||
|
||
:exit | ||
exit /b %RESULT% |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
# SPDX-FileCopyrightText: 2020 Intel Corporation | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
#shellcheck disable=SC2010 | ||
LATEST_VERSION=$(ls -1 "C:\Program Files (x86)\Intel\oneAPI\compiler" | grep -v latest | sort | tail -1) | ||
|
||
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\compiler\lib\ia32_win" | ||
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\bin\intel64_ia32" | ||
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\lib\emu" | ||
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\lib\oclfpga" | ||
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\lib\ocloc" | ||
rm -rf "C:\Program Files (x86)\Intel\oneAPI\compiler\'$LATEST_VERSION'\windows\lib\x86" |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
REM SPDX-FileCopyrightText: 2022 Intel Corporation | ||
REM | ||
REM SPDX-License-Identifier: MIT | ||
|
||
set URL=%1 | ||
set COMPONENTS=%2 | ||
|
||
curl.exe --output %TEMP%\webimage.exe --url %URL% --retry 5 --retry-delay 5 | ||
start /b /wait %TEMP%\webimage.exe -s -x -f webimage_extracted --log extract.log | ||
del %TEMP%\webimage.exe | ||
if "%COMPONENTS%"=="" ( | ||
webimage_extracted\bootstrapper.exe -s --action install --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 --log-dir=. | ||
) else ( | ||
webimage_extracted\bootstrapper.exe -s --action install --components=%COMPONENTS% --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 --log-dir=. | ||
) | ||
set installer_exit_code=%ERRORLEVEL% | ||
rd /s/q "webimage_extracted" | ||
exit /b %installer_exit_code% |
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 |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: windows | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
- master | ||
push: | ||
branches: | ||
- develop | ||
- master | ||
|
||
jobs: | ||
build: | ||
env: | ||
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' | ||
WINDOWS_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7dff44ba-e3af-4448-841c-0d616c8da6e7/w_BaseKit_p_2024.1.0.595_offline.exe | ||
WINDOWS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/c95a3b26-fc45-496c-833b-df08b10297b9/w_HPCKit_p_2024.1.0.561_offline.exe | ||
LINUX_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/fdc7a2bc-b7a8-47eb-8876-de6201297144/l_BaseKit_p_2024.1.0.596_offline.sh | ||
LINUX_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/7f096850-dc7b-4c35-90b5-36c12abd9eaa/l_HPCKit_p_2024.1.0.560_offline.sh | ||
LINUX_AIKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/0414ef18-5b64-47f2-9b2e-ae94860272b9/l_AITools.2024.1.0.9.sh | ||
MACOS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/c112cca6-12cf-4a0c-9e5e-d0d50d3b0f8b/m_RenderKit_p_2024.1.0.744_offline.dmg | ||
WINDOWS_CPP_COMPONENTS: intel.oneapi.win.cpp-dpcpp-common | ||
WINDOWS_FORTRAN_COMPONENTS: intel.oneapi.win.ifort-compiler | ||
WINDOWS_DPCPP_COMPONENTS: intel.oneapi.win.cpp-dpcpp-common | ||
LINUX_CPP_COMPONENTS: intel-oneapi-dpcpp-cpp-compiler | ||
LINUX_FORTRAN_COMPONENTS: intel-oneapi-compiler-fortran | ||
LINUX_DPCPP_COMPONENTS: intel-oneapi-compiler-dpcpp-cpp | ||
LINUX_CPP_COMPONENTS_WEB: intel.oneapi.lin.dpcpp-cpp-compiler | ||
LINUX_FORTRAN_COMPONENTS_WEB: intel.oneapi.lin.ifort-compiler | ||
LINUX_DPCPP_COMPONENTS_WEB: intel.oneapi.lin.dpcpp-cpp-compiler | ||
MACOS_CPP_COMPONENTS: intel.oneapi.mac.cpp-compiler | ||
MACOS_FORTRAN_COMPONENTS: intel.oneapi.mac.ifort-compiler | ||
CACHE_NUMBER: 6 | ||
SAMPLES_TAG: 2024.1.0 | ||
COMPILER_VERSION: 2024.1.0 | ||
TBB_VERSION: 2021.12.0 | ||
VS_VER: vs2022 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- windows-2022 | ||
toolset: | ||
- v142 | ||
- v143 | ||
runs-on: ${{matrix.os}} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: cache install | ||
id: cache-install | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat | ||
C:\Program Files (x86)\Intel\oneAPI\compiler | ||
key: install-${{ env.CACHE_NUMBER }}-${{ env.WINDOWS_HPCKIT_URL }}-${{ env.WINDOWS_FORTRAN_COMPONENTS }}-compiler-${{ hashFiles('**/scripts/cache_exclude_windows.sh') }} | ||
- name: install | ||
if: steps.cache-install.outputs.cache-hit != 'true' | ||
run: .github/scripts/install_windows.bat $WINDOWS_HPCKIT_URL $WINDOWS_FORTRAN_COMPONENTS | ||
- name: Configure | ||
run: | | ||
cmake --preset ci-windows-${{matrix.toolset}} ${{github.workspace}} -T ${{matrix.toolset}} | ||
# - name: build | ||
# run: .github/scripts/build_windows.bat fortran $VS_VER $SAMPLES_TAG | ||
- name: exclude unused files from cache | ||
if: steps.cache-install.outputs.cache-hit != 'true' | ||
shell: bash | ||
run: .github/scripts/cache_exclude_windows.sh | ||
|
||
# Delete the following if you don't want to save install logs | ||
- name: Saving install logs | ||
if: steps.cache-install.outputs.cache-hit != 'true' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: InstallLogs_${{ github.job }} | ||
path: | | ||
extract.log | ||
bootstrapper* | ||
installer* | ||
retention-days: 7 |
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 |
---|---|---|
@@ -0,0 +1,213 @@ | ||
{ | ||
"version": 3, | ||
"cmakeMinimumRequired": { | ||
"major": 3, | ||
"minor": 24, | ||
"patch": 0 | ||
}, | ||
"configurePresets": [ | ||
{ | ||
"name": "ci", | ||
"displayName": "CI build", | ||
"description": "Build configuration for GitHub Actions CI", | ||
"generator": "Ninja", | ||
"binaryDir": "${sourceDir}/build", | ||
"cacheVariables": { | ||
} | ||
}, | ||
{ | ||
"name": "ci-windows-v142", | ||
"displayName": "ci-windows-v142", | ||
"description": "Build configuration for GitHub Actions CI", | ||
"generator": "NMake Makefiles", | ||
"inherits": "ci", | ||
"cacheVariables": { | ||
} | ||
}, | ||
{ | ||
"name": "ci-windows-v143", | ||
"displayName": "ci-windows-v143", | ||
"description": "Build configuration for GitHub Actions CI", | ||
"generator": "NMake Makefiles", | ||
"inherits": "ci", | ||
"cacheVariables": { | ||
} | ||
}, | ||
{ | ||
"name": "ci-macos-x64", | ||
"displayName": "ci-macos-x64", | ||
"description": "Build configuration for GitHub Actions CI", | ||
"generator": "Ninja", | ||
"inherits": "ci", | ||
"cacheVariables": { | ||
"VCPKG_TARGET_TRIPLET": { | ||
"type": "STRING", | ||
"value": "x64-osx-v11" | ||
}, | ||
"VCPKG_HOST_TRIPLET": { | ||
"type": "STRING", | ||
"value": "x64-osx-v11" | ||
}, | ||
"Python3_EXECUTABLE": { | ||
"type": "PATH", | ||
"value": "/Users/runner/hostedtoolcache/Python/3.10.13/x64/bin/python3.10" | ||
}, | ||
"SIMPLNX_PY_DISABLE_HIDDEN_VISIBILITY": { | ||
"type": "BOOL", | ||
"value": "ON" | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "ci-macos-arm64", | ||
"displayName": "ci-macos-arm64", | ||
"description": "Build configuration for GitHub Actions CI", | ||
"generator": "Ninja", | ||
"inherits": "ci", | ||
"cacheVariables": { | ||
"VCPKG_TARGET_TRIPLET": { | ||
"type": "STRING", | ||
"value": "arm64-osx-dynamic" | ||
}, | ||
"VCPKG_HOST_TRIPLET": { | ||
"type": "STRING", | ||
"value": "arm64-osx-dynamic" | ||
}, | ||
"Python3_EXECUTABLE": { | ||
"type": "PATH", | ||
"value": "/Users/runner/hostedtoolcache/Python/3.10.13/x64/bin/python3.10" | ||
}, | ||
"SIMPLNX_PY_DISABLE_HIDDEN_VISIBILITY": { | ||
"type": "BOOL", | ||
"value": "ON" | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "ci-linux-x64", | ||
"displayName": "ci-linux-x64", | ||
"description": "Build configuration for GitHub Actions CI", | ||
"generator": "Ninja", | ||
"inherits": "ci", | ||
"cacheVariables": { | ||
"VCPKG_TARGET_TRIPLET": { | ||
"type": "STRING", | ||
"value": "x64-linux-dynamic" | ||
}, | ||
"VCPKG_HOST_TRIPLET": { | ||
"type": "STRING", | ||
"value": "x64-linux-dynamic" | ||
}, | ||
"Python3_EXECUTABLE": { | ||
"type": "PATH", | ||
"value": "/opt/hostedtoolcache/Python/3.10.13/x64/bin/python3.10" | ||
} | ||
} | ||
} | ||
], | ||
"buildPresets": [ | ||
{ | ||
"name": "ci-windows-v142", | ||
"displayName": "ci-windows-v142 Release build", | ||
"description": "Build configuration for GitHub actions CI", | ||
"configurePreset": "ci-windows-v142", | ||
"configuration": "Release" | ||
}, | ||
{ | ||
"name": "ci-windows-v143", | ||
"displayName": "ci-windows-v143 CI build", | ||
"description": "Build configuration for GitHub actions CI", | ||
"configurePreset": "ci-windows-v143", | ||
"configuration": "Release" | ||
}, | ||
{ | ||
"name": "ci-macos-x64", | ||
"displayName": "ci-macos-x64 CI build", | ||
"description": "Build configuration for GitHub actions CI", | ||
"configurePreset": "ci-macos-x64", | ||
"configuration": "Release" | ||
}, | ||
{ | ||
"name": "ci-macos-arm64", | ||
"displayName": "ci-macos-arm64 CI build", | ||
"description": "Build configuration for GitHub actions CI", | ||
"configurePreset": "ci-macos-arm64", | ||
"configuration": "Release" | ||
}, | ||
{ | ||
"name": "ci-linux-x64", | ||
"displayName": "ci-linux-x64 CI build", | ||
"description": "Build configuration for GitHub actions CI", | ||
"configurePreset": "ci-linux-x64", | ||
"configuration": "Release" | ||
}, | ||
{ | ||
"name": "ci-asan", | ||
"displayName": "asan CI build", | ||
"description": "Build configuration for GitHub actions CI", | ||
"configurePreset": "ci-asan" | ||
} | ||
], | ||
"testPresets": [ | ||
{ | ||
"name": "ci-windows-v142", | ||
"displayName": "ci-windows-v142 CI build", | ||
"description": "Build configuration for GitHub actions CI", | ||
"configurePreset": "ci-windows-v142", | ||
"configuration": "Release", | ||
"output": { | ||
"outputOnFailure": true | ||
} | ||
}, | ||
{ | ||
"name": "ci-windows-v143", | ||
"displayName": "ci-windows-v143 CI build", | ||
"description": "Build configuration for GitHub actions CI", | ||
"configurePreset": "ci-windows-v143", | ||
"configuration": "Release", | ||
"output": { | ||
"outputOnFailure": true | ||
} | ||
}, | ||
{ | ||
"name": "ci-macos-x64", | ||
"displayName": "ci-macos-x64 CI build", | ||
"description": "Build configuration for GitHub actions CI", | ||
"configurePreset": "ci-macos-x64", | ||
"configuration": "Release", | ||
"output": { | ||
"outputOnFailure": true | ||
} | ||
}, | ||
{ | ||
"name": "ci-macos-arm64", | ||
"displayName": "ci-macos-arm64 CI build", | ||
"description": "Build configuration for GitHub actions CI", | ||
"configurePreset": "ci-macos-arm64", | ||
"configuration": "Release", | ||
"output": { | ||
"outputOnFailure": true | ||
} | ||
}, | ||
{ | ||
"name": "ci-linux-x64", | ||
"displayName": "ci-linux-x64 CI build", | ||
"description": "Build configuration for GitHub actions CI", | ||
"configurePreset": "ci-linux-x64", | ||
"configuration": "Release", | ||
"output": { | ||
"outputOnFailure": true | ||
} | ||
}, | ||
{ | ||
"name": "ci-asan", | ||
"displayName": "asan CI build", | ||
"description": "Build configuration for GitHub actions CI", | ||
"configurePreset": "ci-asan", | ||
"output": { | ||
"outputOnFailure": true | ||
} | ||
} | ||
] | ||
} | ||
|