-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Neater caching and saving binary artifacts for benchmarks (#78)
* Save binary as artifact * Remove steps duplicated from install.sh * Add back wget and zlib installs * Source intel compiler on macos * Do not skip hdf5 * Reinstall gcc with brew * debug * Some workarounds for macos * Memcpy error and other fixes (#4) * add macos library path * link brew's gcc compiler * remove unnecessary vars * brew reinstall gcc * debug install dir * Revert "debug install dir" This reverts commit 6297348. * debug prints * debug prints * install with cp -rf * Revert "install with cp -rf" This reverts commit 39e6ebb. * don't cp ifort bin into include dir * remove debug prints * Add artifact download path * Set +x permission to mcfost in benchmark * Consolidate macos and linux dependency workflows * fix typo * Add dependency workflow file to hash Also some debugging output for macos cache paths * Exclude Cellar from cache Since it is enormous. * remove debug step * Swap linux intel to manual install i.e. remove container since its huge. * single install at a time * export intel compiler path to github env * typo * Swap macos and linux env Was wrong way round * sudo the install script * Change include dir permissions * Update chmod with sudo * Set o+w * chmod lib too * Combine chmods * debug cached file sizes * typo * typo * add sudo * Remove debugging * Specify cache directories exactly * debug cache size for ifort linux * Further specify cached lib path * Fix cache path for different compilers * Remove debugging * Adjust include and lib permissions * recursive chmod before cache restore * add +x permission * debugging permissions * try 777 as a last resort * grant tar root o+x * typo * Deal with tar only for linux-intel --------- Co-authored-by: Conrad Chan <[email protected]>
- Loading branch information
1 parent
64ee441
commit cad0964
Showing
5 changed files
with
90 additions
and
154 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
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,69 @@ | ||
name: "dependencies" | ||
description: "macos and linux dependencies" | ||
|
||
# Note: needs GCC > 12, and sudo, wherever you're building | ||
# Using gcc-11 will return a bug when compiling gas/wavelengths_gas.f90 | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
# Each OS has some quirk for each compiler, so these 4 steps deal with those | ||
- name: install wget (GNU / linux) | ||
if: matrix.compiler == 'gfortran' && matrix.os == 'linux' | ||
shell: bash | ||
run: dnf install -y sudo wget epel-release | ||
|
||
- name: install intel compilers (intel / linux) | ||
if: matrix.compiler == 'ifort' && matrix.os == 'linux' | ||
shell: bash | ||
run: | | ||
wget -nv https://registrationcenter-download.intel.com/akdlm/IRC_NAS/ebf5d9aa-17a7-46a4-b5df-ace004227c0e/l_dpcpp-cpp-compiler_p_2023.2.1.8_offline.sh & | ||
wget -nv https://registrationcenter-download.intel.com/akdlm/IRC_NAS/0d65c8d4-f245-4756-80c4-6712b43cf835/l_fortran-compiler_p_2023.2.1.8_offline.sh & | ||
wait | ||
chmod +x l_dpcpp-cpp-compiler_p_2023.2.1.8_offline.sh | ||
./l_dpcpp-cpp-compiler_p_2023.2.1.8_offline.sh -a --silent --eula accept | ||
chmod +x l_fortran-compiler_p_2023.2.1.8_offline.sh | ||
./l_fortran-compiler_p_2023.2.1.8_offline.sh -a --silent --eula accept | ||
echo "INTEL_PATH=/home/runner/intel/oneapi" >> "$GITHUB_ENV" | ||
sudo chown root /bin/tar && sudo chmod u+s /bin/tar | ||
- name: fix gcc issue on the runner (GNU / macos) | ||
if: matrix.compiler == 'gfortran' && matrix.os == 'macos' | ||
shell: bash | ||
run: | | ||
brew reinstall gcc@13 | ||
ln -s /usr/local/bin/gcc-13 /usr/local/bin/gcc | ||
ln -s /usr/local/bin/g++-13 /usr/local/bin/g++ | ||
- name: install intel compilers (intel / macos) | ||
if: matrix.compiler == 'ifort' && matrix.os == 'macos' | ||
shell: bash | ||
run: | | ||
wget -nv https://registrationcenter-download.intel.com/akdlm/IRC_NAS/2fbce033-15f4-4e13-8d14-f5a2016541ce/m_fortran-compiler-classic_p_2023.2.0.49001_offline.dmg & | ||
wget -nv https://registrationcenter-download.intel.com/akdlm/IRC_NAS/ebba13f8-1690-4d30-9d43-1e2fa2d536cd/m_cpp-compiler-classic_p_2023.2.0.48999_offline.dmg & | ||
wait | ||
hdiutil attach m_fortran-compiler-classic_p_2023.2.0.49001_offline.dmg | ||
sudo /Volumes/m_fortran-compiler-classic_p_2023.2.0.49001_offline/bootstrapper.app/Contents/MacOS/install.sh --silent --eula accept | ||
hdiutil attach m_cpp-compiler-classic_p_2023.2.0.48999_offline.dmg | ||
sudo /Volumes/m_cpp-compiler-classic_p_2023.2.0.48999_offline/bootstrapper.app/Contents/MacOS/install.sh --silent --eula accept | ||
echo "INTEL_PATH=/opt/intel/oneapi" >> "$GITHUB_ENV" | ||
# Cache other dependencies for mcfost to avoid downloading/installing them each time this workflow runs | ||
- name: cache dependencies | ||
id: cache-deps | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
${{ env.MCFOST_INSTALL }}/include | ||
${{ env.MCFOST_INSTALL }}/lib/${{ matrix.compiler }} | ||
key: mcfost-deps-${{ runner.os }}-${{ matrix.compiler }}-${{ hashFiles('lib/install.sh') }} | ||
|
||
# Only do this (lengthy) setup if dependency cache not found | ||
- name: prepare mcfost environment | ||
if: ${{ steps.cache-deps.outputs.cache-hit != 'true' }} | ||
shell: bash -e {0} | ||
working-directory: lib | ||
run: | | ||
[ ! "$SETVARS_COMPLETED" == 1 ] && test -f "$INTEL_PATH"/setvars.sh && . "$INTEL_PATH"/setvars.sh | ||
sudo chmod o+w /usr/local/include /usr/local/lib | ||
./install.sh |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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