Merge pull request #1660 from gforney/master #540
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: CMake Build | |
on: [push, pull_request] | |
env: | |
WINDOWS_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/18599/w_BaseKit_p_2022.1.3.210_offline.exe | |
WINDOWS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/18578/w_HPCKit_p_2022.1.3.145_offline.exe | |
LINUX_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/18487/l_BaseKit_p_2022.1.2.146_offline.sh | |
LINUX_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/18479/l_HPCKit_p_2022.1.2.117_offline.sh | |
MACOS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/18341/m_HPCKit_p_2022.1.0.86_offline.dmg | |
WINDOWS_CPP_COMPONENTS: intel.oneapi.win.cpp-compiler | |
WINDOWS_FORTRAN_COMPONENTS: intel.oneapi.win.ifort-compiler | |
WINDOWS_DPCPP_COMPONENTS: intel.oneapi.win.dpcpp-compiler | |
LINUX_CPP_COMPONENTS: intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic | |
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-pro | |
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: 2 | |
COMPILER_VERSION: 2022.0.3 | |
BUILD_TYPE: Release | |
jobs: | |
build_unix_gcc: | |
name: build ${{ matrix.os }} - lua=${{ matrix.lua }} - gcc | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
lua: | |
- on | |
- off | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install linux deps | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install build-essential freeglut3-dev libx11-dev libxmu-dev libxi-dev libglew-dev libgd-dev liblua5.4-dev | |
- name: set macos gcc | |
if: runner.os == 'macOS' | |
shell: bash | |
run: | | |
echo "CC=gcc-11" >> $GITHUB_ENV | |
echo "CXX=g++-11" >> $GITHUB_ENV | |
- name: set linux gcc | |
if: runner.os == 'Linux' | |
shell: bash | |
run: | | |
echo "CC=gcc" >> $GITHUB_ENV | |
echo "CXX=g++" >> $GITHUB_ENV | |
- name: Build | |
shell: bash | |
run: | | |
cmake -B ${{github.workspace}}/cbuild -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLUA=${{ matrix.lua }} | |
cmake --build ${{github.workspace}}/cbuild -j4 | |
cp ${{github.workspace}}/cbuild/smokeview smokeview | |
- name: Download test data | |
working-directory: ${{github.workspace}}/Tests | |
run: ./get_test_data.sh | |
- name: Test | |
shell: bash | |
working-directory: ${{github.workspace}}/cbuild | |
run: | | |
ctest -j10 --output-on-failure -V | |
- name: Set exec suffix | |
if: ${{ matrix.lua }} | |
run: echo "exec_suffix=-lua" >> $GITHUB_ENV | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: smokeview-${{ runner.os }}-${{ env.exec_suffix }} | |
path: smokeview | |
build_unix_rpm_gcc: | |
name: build (rpm) ${{ matrix.os }} - lua=${{ matrix.lua }} - gcc | |
runs-on: ubuntu-latest | |
container: centos:7 | |
strategy: | |
fail-fast: false | |
matrix: | |
lua: | |
- on | |
- off | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install linux deps | |
run: | | |
yum -y install epel-release | |
yum -y install cmake3 | |
yum -y install make gcc-c++ mesa-libGL-devel glut-devel libjpeg-devel libpng-devel gd-devel glew-devel libXmu-devel libXi-devel lua-devel | |
yum -y install wget unzip git | |
- name: set gcc | |
shell: bash | |
run: | | |
echo "CC=gcc" >> $GITHUB_ENV | |
echo "CXX=g++" >> $GITHUB_ENV | |
- name: Build | |
shell: bash | |
run: | | |
cmake3 -B ${{github.workspace}}/cbuild -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLUA=${{ matrix.lua }} | |
cmake3 --build ${{github.workspace}}/cbuild -j4 | |
cp ${{github.workspace}}/cbuild/smokeview smokeview | |
# - name: Download test data | |
# working-directory: ${{github.workspace}}/Tests | |
# run: ./get_test_data.sh | |
# - name: Test | |
# shell: bash | |
# working-directory: ${{github.workspace}}/cbuild | |
# run: | | |
# ctest -j10 --output-on-failure -V | |
- name: Set exec suffix | |
if: ${{ matrix.lua }} | |
run: echo "exec_suffix=-lua" >> $GITHUB_ENV | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: smokeview-${{ runner.os }}-${{ env.exec_suffix }} | |
path: smokeview | |
build_unix_rpm_intel: | |
name: build (rpm) ${{ matrix.os }} - lua=${{ matrix.lua }} - intel | |
runs-on: ubuntu-latest | |
container: centos:7 | |
strategy: | |
fail-fast: false | |
matrix: | |
lua: | |
- on | |
- off | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install linux deps | |
run: | | |
yum -y install epel-release | |
yum -y install cmake3 | |
yum -y install make gcc-c++ mesa-libGL-devel glut-devel libjpeg-devel libpng-devel gd-devel glew-devel libXmu-devel libXi-devel lua-devel | |
yum -y install wget unzip git | |
- name: Add intel RPM repo | |
run: | | |
tee > /tmp/oneAPI.repo << EOF | |
[oneAPI] | |
name=Intel® oneAPI repository | |
baseurl=https://yum.repos.intel.com/oneapi | |
enabled=1 | |
gpgcheck=1 | |
repo_gpgcheck=1 | |
gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | |
EOF | |
mv /tmp/oneAPI.repo /etc/yum.repos.d | |
- name: General update | |
run: yum -y makecache | |
- run: yum install -y environment-modules intel-oneapi-compiler-dpcpp-cpp-2023.1.0 | |
- run: /opt/intel/oneapi/modulefiles-setup.sh | |
- name: Build | |
shell: bash | |
run: | | |
. /etc/profile.d/modules.sh | |
module use /opt/intel/oneapi/modulefiles | |
module load compiler | |
CC=icx CXX=icx cmake3 -B ${{github.workspace}}/cbuild -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLUA=${{ matrix.lua }} | |
cmake3 --build ${{github.workspace}}/cbuild -j4 | |
cp ${{github.workspace}}/cbuild/smokeview smokeview | |
# - name: Download test data | |
# working-directory: ${{github.workspace}}/Tests | |
# run: ./get_test_data.sh | |
# - name: Test | |
# shell: bash | |
# working-directory: ${{github.workspace}}/cbuild | |
# run: | | |
# ctest -j10 --output-on-failure -V | |
- name: Set exec suffix | |
if: ${{ matrix.lua }} | |
run: echo "exec_suffix=-lua" >> $GITHUB_ENV | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: smokeview-${{ runner.os }}-${{ env.exec_suffix }} | |
path: smokeview | |
build_unix_intel: | |
name: build ${{ matrix.os }} - lua=${{ matrix.lua }} - intel | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
lua: | |
- on | |
- off | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: prepare for cache restore | |
run: | | |
sudo mkdir -p /opt/intel | |
sudo chown $USER /opt/intel | |
- name: cache install | |
if: runner.os == 'macOS' | |
id: cache-install-macos | |
uses: actions/cache@v2 | |
with: | |
path: /opt/intel/oneapi | |
key: install2-${{ env.MACOS_HPCKIT_URL }}-${{ env.MACOS_CPP_COMPONENTS }} | |
- name: cache install | |
if: runner.os == 'Linux' | |
id: cache-install-linux | |
uses: actions/cache@v2 | |
with: | |
path: /opt/intel/oneapi | |
key: install2-${{ env.LINUX_HPCKIT_URL }}-${{ env.LINUX_CPP_COMPONENTS }} | |
- name: install | |
if: runner.os == 'macOS' && steps.cache-install-macos.outputs.cache-hit != 'true' | |
run: bash .github/workflows/install_macos_oneapi.sh $MACOS_HPCKIT_URL | |
- name: install | |
if: runner.os == 'Linux' && steps.cache-install-linux.outputs.cache-hit != 'true' | |
run: bash .github/workflows/install_linux_oneapi.sh $LINUX_HPCKIT_URL | |
- name: set macos compilers | |
if: runner.os == 'macOS' | |
shell: bash | |
run: | | |
echo "CC=icc" >> $GITHUB_ENV | |
echo "CXX=icpc" >> $GITHUB_ENV | |
- name: set linux intel compiler | |
if: runner.os == 'Linux' | |
shell: bash | |
run: | | |
echo "CC=icx" >> $GITHUB_ENV | |
echo "CXX=icx" >> $GITHUB_ENV | |
- name: Build | |
shell: bash | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install build-essential freeglut3-dev libx11-dev libxmu-dev libxi-dev libgl1-mesa-dev libglew-dev libgd-dev liblua5.4-dev | |
- name: Build | |
shell: bash | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
cmake -B ${{github.workspace}}/cbuild -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLUA=${{ matrix.lua }} | |
cmake --build ${{github.workspace}}/cbuild -j4 | |
cp ${{github.workspace}}/cbuild/smokeview smokeview | |
- name: Download test data | |
working-directory: ${{github.workspace}}/Tests | |
run: ./get_test_data.sh | |
- name: Test | |
shell: bash | |
working-directory: ${{github.workspace}}/cbuild | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
ctest -j10 --output-on-failure | |
- name: Set exec suffix | |
if: ${{ matrix.lua }} == lua | |
run: echo "exec_suffix=-lua" >> $GITHUB_ENV | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: smokeview-${{ runner.os }}-${{ env.exec_suffix }} | |
path: smokeview | |
build_windows_intel: | |
name: build ${{ matrix.os }} - lua=${{ matrix.lua }} - intel | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- windows-2019 | |
lua: | |
- on | |
- off | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: cache install | |
id: cache-install | |
uses: actions/cache@v2 | |
with: | |
path: | | |
C:\Program Files (x86)\Intel\oneAPI\setvars.bat | |
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_CPP_COMPONENTS }}-compiler-${{ hashFiles('**/scripts/cache_exclude_windows.sh') }} | |
- name: install | |
if: steps.cache-install.outputs.cache-hit != 'true' | |
run: .github/workflows/install_windows_oneapi.bat $WINDOWS_HPCKIT_URL $WINDOWS_CPP_COMPONENTS | |
- name: Make latest link | |
shell: cmd | |
run: | | |
rmdir "C:\Program Files (x86)\Intel\oneAPI\compiler\latest" | |
mklink /D "C:\Program Files (x86)\Intel\oneAPI\compiler\latest" "C:\Program Files (x86)\Intel\oneAPI\compiler\2022.0.3" | |
- name: build smokeview lua | |
shell: cmd | |
run: | | |
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" | |
ninja --version | |
cmake --version | |
cmake -B ${{github.workspace}}\cbuild -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLUA=${{ matrix.lua }} | |
cmake --build ${{github.workspace}}\cbuild -j4 | |
copy ${{github.workspace}}\cbuild\smokeview.exe smokeview.exe | |
- name: Download test data | |
working-directory: ${{github.workspace}}/Tests | |
shell: pwsh | |
run: .\get_test_data.ps1 | |
- name: Test | |
shell: bash | |
working-directory: ${{github.workspace}}/cbuild | |
run: | | |
ctest -j10 --output-on-failure | |
- name: Set exec suffix | |
if: ${{ matrix.lua }} == lua | |
run: echo "exec_suffix=-lua" >> $GITHUB_ENV | |
- name: exclude unused files from cache | |
if: steps.cache-install.outputs.cache-hit != 'true' | |
shell: bash | |
run: .github/workflows/cache_exclude_windows.sh | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: smokeview-windows${{ env.exec_suffix }} | |
path: smokeview.exe | |
build_windows_msvc: | |
name: build ${{ matrix.os }} - lua=${{ matrix.lua }} - msvc | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- windows-2022 | |
lua: | |
- on | |
- off | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: build smokeview lua | |
shell: cmd | |
run: | | |
cmake --version | |
cmake -B ${{github.workspace}}\cbuild -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLUA=${{ matrix.lua }} | |
cmake --build ${{github.workspace}}\cbuild -j4 --config ${{env.BUILD_TYPE}} | |
copy ${{github.workspace}}\cbuild\Release\smokeview.exe smokeview.exe | |
- name: Download test data | |
working-directory: ${{github.workspace}}/Tests | |
shell: pwsh | |
run: .\get_test_data.ps1 | |
- name: Test | |
shell: bash | |
working-directory: ${{github.workspace}}/cbuild | |
env: | |
LUA: ${{ matrix.lua }} | |
run: | | |
ctest -j10 -C ${{env.BUILD_TYPE}} --output-on-failure | |
- name: Set exec suffix | |
if: ${{ matrix.lua }} | |
run: echo "exec_suffix=-lua" >> $GITHUB_ENV | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: smokeview-windows-msvc-${{ env.exec_suffix }} | |
path: smokeview.exe |