[pre-commit.ci] auto fixes from pre-commit.com hooks #50
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 and test | |
on: | |
push: | |
branches: | |
- cmake_build_2022_minimal | |
# pull_request: | |
# branches: | |
# - main | |
jobs: | |
build: | |
name: Build - ${{ matrix.distribution }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
distribution: [jammy] | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
file: docker/Dockerfile.${{ matrix.distribution }} | |
push: true | |
tags: fluidity/actions:${{ matrix.distribution }}-${{ github.sha }} | |
unit-test: | |
name: Unit Tests - ${{ matrix.distribution }} | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
distribution: [jammy] | |
output: [unit-tests.xml] | |
steps: | |
- name: Run tests | |
run: | | |
chmod 777 . | |
docker pull fluidity/actions:${{ matrix.distribution }}-${{ github.sha }} | |
docker run -v $PWD:/host fluidity/actions:${{ matrix.distribution }}-${{ github.sha }} \ | |
/bin/bash -c "ninja unittest && | |
cp -v ${{ matrix.output }} /host/${{ matrix.distribution }}-${{ matrix.output }}" | |
- name: Upload test report | |
uses: actions/upload-artifact@v3 | |
with: | |
path: ${{ matrix.distribution }}-${{ matrix.output }} | |
name: xml_outputs | |
- name: Publish test report | |
uses: mikepenz/action-junit-report@v3 | |
if: always() | |
with: | |
report_paths: ${{ matrix.distribution }}-${{ matrix.output }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
check_name: JUnit Test Report - Unit Tests - ${{ matrix.distribution }} | |
fail_on_failure: true | |
# vshort-test: | |
# name: VShort Tests - ${{ matrix.distribution }} | |
# runs-on: ubuntu-latest | |
# needs: build | |
# | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# distribution: [jammy] | |
# output: [vshort-tests.xml] | |
# | |
# steps: | |
# - name: Run tests | |
# run: | | |
# chmod 777 . | |
# docker pull fluidity/actions:${{ matrix.distribution }}-${{ github.sha }} | |
# docker run -v $PWD:/host fluidity/actions:${{ matrix.distribution }}-${{ github.sha }} \ | |
# /bin/bash -c "ninja vshorttest && | |
# cp -v ${{ matrix.output }} /host/${{ matrix.distribution }}-${{ matrix.output }}" | |
# | |
# - name: Upload test report | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# path: ${{ matrix.distribution }}-${{ matrix.output }} | |
# name: xml_outputs | |
# | |
# - name: Publish test report | |
# uses: mikepenz/action-junit-report@v3 | |
# if: always() | |
# with: | |
# report_paths: ${{ matrix.distribution }}-${{ matrix.output }} | |
# token: ${{ secrets.GITHUB_TOKEN }} | |
# check_name: JUnit Test Report - VShort Tests - ${{ matrix.distribution }} | |
# fail_on_failure: true | |
# | |
# short-test: | |
# name: Short Tests - ${{ matrix.distribution }} | |
# runs-on: ubuntu-latest | |
# needs: build | |
# | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# distribution: [jammy] | |
# output: [short-tests.xml] | |
# | |
# steps: | |
# - name: Run tests | |
# run: | | |
# chmod 777 . | |
# docker pull fluidity/actions:${{ matrix.distribution }}-${{ github.sha }} | |
# docker run -v $PWD:/host fluidity/actions:${{ matrix.distribution }}-${{ github.sha }} \ | |
# /bin/bash -c "ninja shorttest && | |
# cp -v ${{ matrix.output }} /host/${{ matrix.distribution }}-${{ matrix.output }}" | |
# | |
# - name: Upload test report | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# path: ${{ matrix.distribution }}-${{ matrix.output }} | |
# name: xml_outputs | |
# | |
# - name: Publish test report | |
# uses: mikepenz/action-junit-report@v3 | |
# if: always() | |
# with: | |
# report_paths: ${{ matrix.distribution }}-${{ matrix.output }} | |
# token: ${{ secrets.GITHUB_TOKEN }} | |
# check_name: JUnit Test Report - Short Tests - ${{ matrix.distribution }} | |
# fail_on_failure: true | |
# | |
# get-lists: | |
# name: Generate JSON files that contain tests to be executed | |
# runs-on: ubuntu-latest | |
# | |
# outputs: | |
# mediumtest-matrix: ${{ steps.set-matrices.outputs.mediumtest-matrix }} | |
# longtest-matrix: ${{ steps.set-matrices.outputs.longtest-matrix }} | |
# vlongtest-matrix: ${{ steps.set-matrices.outputs.vlongtest-matrix }} | |
# | |
# steps: | |
# - name: Checkout repository | |
# uses: actions/checkout@v3 | |
# | |
# - name: Set up Python | |
# uses: actions/setup-python@v4 | |
# with: | |
# python-version: "3.10" | |
# | |
# - name: Generate JSON files | |
# id: set-matrices | |
# run: | | |
# sed -i "s:@CMAKE_SOURCE_DIR@:$PWD:g" tools/testharness.py | |
# sed -i "s:@CMAKE_BINARY_DIR@:${PWD}/build:g" tools/testharness.py | |
# | |
# tools/testharness.py -l medium -o fixme --just-list mediumtests.json | |
# tools/testharness.py -l long --just-list longtests.json | |
# tools/testharness.py -l vlong -o fixme longtime --just-list vlongtests.json | |
# | |
# echo "::set-output name=mediumtest-matrix::$(echo $(cat mediumtests.json))" | |
# echo "::set-output name=longtest-matrix::$(echo $(cat longtests.json))" | |
# echo "::set-output name=vlongtest-matrix::$(echo $(cat vlongtests.json))" | |
# | |
# medium-test: | |
# name: Medium Test - ${{ matrix.distribution }} - ${{ matrix.test-xml }} | |
# runs-on: ubuntu-latest | |
# needs: [build, get-lists] | |
# | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# distribution: [jammy] | |
# test-xml: ${{fromJSON(needs.get-lists.outputs.mediumtest-matrix)}} | |
# | |
# steps: | |
# - name: Testing | |
# run: | | |
# chmod 777 . | |
# docker pull fluidity/actions:${{ matrix.distribution }}-${{ github.sha }} | |
# docker run -v $PWD:/host fluidity/actions:${{ matrix.distribution }}-${{ github.sha }} \ | |
# /bin/bash -c "bin/testharness -f ${{ matrix.test-xml }} \ | |
# -x ${{ matrix.distribution }}-${{ matrix.test-xml }} && | |
# cp -v ${{ matrix.distribution }}-${{ matrix.test-xml }} /host" | |
# | |
# - name: Upload test report | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# path: ${{ matrix.distribution }}-${{ matrix.test-xml }} | |
# name: xml_outputs | |
# | |
# - name: Publish test report | |
# uses: mikepenz/action-junit-report@v3 | |
# if: always() | |
# with: | |
# report_paths: ${{ matrix.distribution }}-${{ matrix.test-xml }} | |
# token: ${{ secrets.GITHUB_TOKEN }} | |
# check_name: JUnit Test Report - Medium Test - ${{ matrix.distribution }} - ${{ matrix.test-xml }} | |
# fail_on_failure: true | |
# | |
# long-test: | |
# name: Long Test - ${{ matrix.distribution }} - ${{ matrix.test-xml }} | |
# runs-on: ubuntu-latest | |
# needs: [build, get-lists] | |
# | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# distribution: [jammy] | |
# test-xml: ${{fromJSON(needs.get-lists.outputs.longtest-matrix)}} | |
# | |
# steps: | |
# - name: Testing | |
# run: | | |
# chmod 777 . | |
# docker pull fluidity/actions:${{ matrix.distribution }}-${{ github.sha }} | |
# docker run -v $PWD:/host fluidity/actions:${{ matrix.distribution }}-${{ github.sha }} \ | |
# /bin/bash -c "bin/testharness -f ${{ matrix.test-xml }} \ | |
# -x ${{ matrix.distribution }}-${{ matrix.test-xml }} && | |
# cp -v ${{ matrix.distribution }}-${{ matrix.test-xml }} /host" | |
# | |
# - name: Upload test report | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# path: ${{ matrix.distribution }}-${{ matrix.test-xml }} | |
# name: xml_outputs | |
# | |
# - name: Publish test report | |
# uses: mikepenz/action-junit-report@v3 | |
# if: always() | |
# with: | |
# report_paths: ${{ matrix.distribution }}-${{ matrix.test-xml }} | |
# token: ${{ secrets.GITHUB_TOKEN }} | |
# check_name: JUnit Test Report - Long Test - ${{ matrix.distribution }} - ${{ matrix.test-xml }} | |
# fail_on_failure: true | |
# | |
# vlong-test: | |
# name: VLong Test - ${{ matrix.distribution }} - ${{ matrix.test-xml }} | |
# runs-on: ubuntu-latest | |
# needs: [build, get-lists] | |
# | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# distribution: [jammy] | |
# test-xml: ${{fromJSON(needs.get-lists.outputs.vlongtest-matrix)}} | |
# | |
# steps: | |
# - name: Testing | |
# run: | | |
# chmod 777 . | |
# docker pull fluidity/actions:${{ matrix.distribution }}-${{ github.sha }} | |
# docker run -v $PWD:/host fluidity/actions:${{ matrix.distribution }}-${{ github.sha }} \ | |
# /bin/bash -c "bin/testharness -f ${{ matrix.test-xml }} \ | |
# -x ${{ matrix.distribution }}-${{ matrix.test-xml }} && | |
# cp -v ${{ matrix.distribution }}-${{ matrix.test-xml }} /host" | |
# | |
# - name: Upload test report | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# path: ${{ matrix.distribution }}-${{ matrix.test-xml }} | |
# name: xml_outputs | |
# | |
# - name: Publish test report | |
# uses: mikepenz/action-junit-report@v3 | |
# if: always() | |
# with: | |
# report_paths: ${{ matrix.distribution }}-${{ matrix.test-xml }} | |
# token: ${{ secrets.GITHUB_TOKEN }} | |
# check_name: JUnit Test Report - VLong Test - ${{ matrix.distribution }} - ${{ matrix.test-xml }} | |
# fail_on_failure: true |