[Draft] Modify mesh IO to support nonconformal mesh initialization #67
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: Singularity | |
on: | |
push: | |
branches: | |
- main | |
tags: '*' | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CONTAINER_NAME: palace.sif | |
IMAGE_NAME: ghcr.io/${{ github.repository }} | |
jobs: | |
build-and-test-singularity: | |
runs-on: palace_ubuntu-latest_16-core | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: singularityhub/install-singularity@main | |
- name: Build container | |
run: | | |
sudo singularity build --bind ${{ github.workspace }}:/opt/palace-src:ro \ | |
$CONTAINER_NAME singularity/singularity.def | |
- name: Run tests | |
env: | |
NUM_PROC_TEST_MAX: '8' | |
run: | | |
# Configure environment | |
export NUM_PROC_TEST=$(nproc 2> /dev/null || sysctl -n hw.ncpu) | |
if [[ "$NUM_PROC_TEST" -gt "$NUM_PROC_TEST_MAX" ]]; then | |
NUM_PROC_TEST=$NUM_PROC_TEST_MAX | |
fi | |
export PALACE_TEST="singularity run $CONTAINER_NAME" | |
# Run tests | |
julia --project=test -e 'using Pkg; Pkg.instantiate()' | |
julia --project=test --color=yes test/runtests.jl | |
- uses: docker/metadata-action@v4 | |
if: github.event_name != 'pull_request' | |
id: metadata | |
with: | |
images: ${{ env.IMAGE_NAME }} | |
- name: Push container | |
if: github.event_name != 'pull_request' | |
shell: bash | |
run: | | |
# Push multiple tags (separated by newlines) | |
echo "Container tags: ${{ steps.metadata.outputs.tags }}" | |
echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ github.repository_owner }} --password-stdin oras://ghcr.io | |
while IFS= read -r remote; do | |
singularity push -U $CONTAINER_NAME "oras://${remote}" | |
done <<< "${{ steps.metadata.outputs.tags }}" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.CONTAINER_NAME }} | |
path: ${{ env.CONTAINER_NAME }} | |
retention-days: 1 |