Avoid some numerically messy subtractions in the EOS #958
Workflow file for this run
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: Build on Linux with SDK | |
on: [pull_request, release] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
sdk: ["20.12.1", "21.4.1", "22.6.1"] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Delete unused packages | |
run: | | |
# commands lifted from https://github.com/jlumbroso/free-disk-space | |
sudo rm -rf /usr/local/lib/android | |
sudo apt-get remove -y '^aspnetcore-.*' | |
sudo apt-get remove -y '^dotnet-.*' # 990 MB | |
sudo apt-get remove -y '^llvm-.*' # 1052 MB | |
# sudo apt-get remove -y 'php.*' # 56.6 MB | |
# sudo apt-get remove -y '^mysql-.*' # 209 MB | |
sudo apt-get remove -y azure-cli google-cloud-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri # 2274 MB | |
sudo apt-get autoremove -y # 771 MB | |
sudo apt-get clean | |
- name: Checkout | |
uses: actions/checkout@v3.0.0 | |
- name: Create LFS file list | |
run: | | |
git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id | |
- name: Restore LFS cache | |
uses: actions/cache@v3 | |
id: lfs-cache | |
with: | |
path: .git/lfs | |
key: ${{ runner.os }}-${{ hashFiles('.lfs-assets-id') }}-v1 | |
- name: Git LFS Pull | |
run: git lfs pull | |
if: steps.lfs-cache.outputs.cache-hit != 'true' | |
- name: Git LFS Checkout | |
run: git lfs checkout | |
if: steps.lfs-cache.outputs.cache-hit == 'true' | |
- name: Install dependencies Linux | |
run: | | |
sudo apt-get -y update | |
sudo apt-get -y install wget binutils make perl libx11-6 libx11-dev zlib1g zlib1g-dev tcsh | |
shell: bash | |
- uses: actions/cache@v3 | |
id: cache | |
with: | |
path: | | |
mesasdk-x86_64-linux-${{matrix.sdk}}.tar.gz | |
key: ${{ runner.os }}-${{matrix.sdk}} | |
- name: Get SDK ${{ runner.os }} '20.12.1' | |
if: ${{ (steps.cache.outputs.cache-hit != 'true') && ( matrix.sdk == '20.12.1') }} | |
run: | | |
wget -q https://zenodo.org/record/4587206/files/mesasdk-x86_64-linux-20.12.1.tar.gz | |
shell: bash | |
- name: Get SDK ${{ runner.os }} '21.4.1' | |
if: ${{ (steps.cache.outputs.cache-hit != 'true') && ( matrix.sdk == '21.4.1') }} | |
run: | | |
wget -q https://zenodo.org/record/5802444/files/mesasdk-x86_64-linux-21.4.1.tar.gz | |
shell: bash | |
- name: Get SDK ${{ runner.os }} '22.6.1' | |
if: ${{ (steps.cache.outputs.cache-hit != 'true') && ( matrix.sdk == '22.6.1') }} | |
run: | | |
wget -q https://zenodo.org/record/7457681/files/mesasdk-x86_64-linux-22.6.1.tar.gz | |
shell: bash | |
- name: Unpack SDK ${{ runner.os }} ${{matrix.sdk}} | |
run: | | |
tar xvf mesasdk-x86_64-linux-${{matrix.sdk}}.tar.gz | |
shell: bash | |
- name: Compile | |
shell: bash | |
run: | | |
# Linux runners have 2 cores | |
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources | |
export OMP_NUM_THREADS=2 | |
export NPROCS=2 | |
export "MESASDK_ROOT=$(readlink -f mesasdk)" | |
source "${MESASDK_ROOT}/bin/mesasdk_init.sh" | |
export "MESA_DIR=$(readlink -f ./)" | |
# Everything is run as root so we need to disable the root check in the install script | |
sed -i 's/\${EUID:-\$(id -u)}/1/' install | |
# Turn off caching during build to save more space | |
sed -i 's/use_cache_for_eos = .true./use_cache_for_eos = .false./g' $MESA_DIR/eos/public/eos_def.f90 | |
sed -i 's/use_cache = .true./use_cache = .false./g' $MESA_DIR/star/private/star_private_def.f90 | |
./install | |
if [ ! -f lib/libbinary.a ]; then | |
exit 1 | |
fi |