installation from container #51
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: Containers | |
on: | |
push: | |
branches: [ "CI_workflows" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Set environment variables | |
run: | | |
pip install toml | |
echo "HOME_DEF=$GITHUB_WORKSPACE/.github/workflows" >> $GITHUB_ENV | |
VER=$(python3 -c "import toml; print(toml.load('pyproject.toml')['project']['version'])") | |
echo "VER=$VER" >> $GITHUB_ENV | |
- name: Install Apptainer | |
run: | | |
sudo apt update && sudo apt install -y software-properties-common | |
sudo add-apt-repository -y ppa:apptainer/ppa | |
sudo apt update && sudo apt install -y apptainer | |
sudo apt clean && sudo apt autoclean | |
- name: Build AMD64 image | |
run: | | |
apptainer build eophis_v${VER}_amd64.sif $HOME_DEF/apptainer_eophis.def | |
- name: Upload AMD64 Image as GitHub Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: eophis_v${{ env.VER }}_amd64 | |
path: ./eophis_v${{ env.VER }}_amd64.sif |