PR for #25 - Validation workflow (commented out until true reference files available) #70
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: Samurai CPU CI with Beltrami | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "main" | |
- "thermo_asap" | |
pull_request: | |
branches: | |
- "main" | |
- "thermo_asap" | |
jobs: | |
build-and-run: | |
name: Build and Run | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code from a pull request or push | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Delete huge unnecessary tools folder | |
run: rm -rf /opt/hostedtoolcache | |
- name: Build Docker image | |
run: docker build -f docker/Dockerfile -t samurai:latest . | |
- name: Running the Beltrami case in container | |
run: docker run -d --name test-container samurai:latest | |
#uncomment to include validation tests | |
# - name: Setup validation environment | |
# run: docker build -f docker/Dockerfile.validation -t samurai-validation . | |
# - name: Run Beltrami validation test | |
# run: docker run --name test-container-validation --volumes-from test-container samurai-validation | |
coverage: | |
name: Coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code from a pull request or push | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Delete huge unnecessary tools folder | |
run: rm -rf /opt/hostedtoolcache | |
- name: Build Docker image | |
run: docker build -f docker/Dockerfile.coverage -t samurai . | |
- name: Run coverage tests in container | |
run: docker run --name test-container -t samurai make coverage | |
- name: Copy coverage from container | |
run: docker cp test-container:/app/samurai/build/coverage.info . | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
files: coverage.info | |
token: ${{ secrets.CODECOV_TOKEN }} |