updated base image #100
This file contains hidden or 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: [push] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| - name: Set git branch and tag variables | |
| run: | | |
| echo "BRANCH=$(git branch --show-current)" >> $GITHUB_ENV | |
| if [ "$(git branch --show-current)" == "main" ]; then | |
| echo "TAG=$(git describe --tags)" >> $GITHUB_ENV | |
| else | |
| echo "TAG=$(git branch --show-current)" >> $GITHUB_ENV | |
| fi | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Registry | |
| run: docker login quay.io -u ${{ secrets.QUAY_USERNAME }} --password ${{ secrets.QUAY_PASSWORD }} | |
| - name: Build the Docker image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: false | |
| load: true | |
| tags: quay.io/matsengrp/linearham:${{ env.TAG }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Run tests in the Docker image | |
| run: docker run quay.io/matsengrp/linearham:${{ env.TAG }} sh -c "/linearham/_build/test/test" | |
| - name: Run fast integration test in the Docker image | |
| run: docker run --rm quay.io/matsengrp/linearham:${{ env.TAG }} sh -c "/linearham/test-fast.sh && /linearham/clean.sh" | |
| #- name: publish to Registry | |
| # run: docker push quay.io/matsengrp/linearham:${{ env.TAG }} | |
| - name: Build documentation | |
| if: github.ref == 'refs/heads/main' | |
| run: docker run --rm -v $(pwd):/data nakatt/doxygen:1.8.17 Doxyfile | |
| - name: Deploy to GitHub Pages | |
| if: github.ref == 'refs/heads/main' | |
| uses: JamesIves/[email protected] | |
| with: | |
| ACCESS_TOKEN: ${{ secrets.GH_PAGES_PERSONAL_ACCESS_TOKEN }} | |
| BRANCH: gh-pages | |
| FOLDER: html | |
| - name: Slack Notification | |
| uses: homoluctus/slatify@master | |
| if: always() | |
| with: | |
| type: ${{ job.status }} | |
| job_name: 'Linearham Build' | |
| url: ${{ secrets.SLACK_NOTIFICATION_WEBHOOK}} |