Build-Test-Linux #57
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-Test-Linux | |
on: | |
workflow_dispatch: | |
jobs: | |
build-test-linux: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: Build | |
run: | | |
docker build -t "bincat:ci-test" . -f "docker/Dockerfile.runtests" | |
- name: Run tests | |
run: | | |
mkdir -p out | |
docker run --rm -v "$(pwd)"/out:/out -w /install/bincat/test "bincat:ci-test" bash -x -c 'python3 -m pytest --coverage smoke -k "not repne" --junitxml=/install/bincat/test-results/pytest_report.xml || true; cp /install/bincat/test-results/pytest_report.xml /out/' | |
- name: Upload Test Results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Unit Test Results | |
path: out/pytest_report.xml | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
if: always() | |
with: | |
files: out/pytest_report.xml | |
- name: Build BinCAT for Linux installer | |
#if: ${{ github.event.type == 'PushEvent' && github.event.ref == 'refs/heads/master' }} | |
run: | | |
mkdir -p out | |
docker run -v "$(pwd)"/out:/out -w /install/bincat "bincat:ci-test" bash -x -c 'make lindist && cp -R bincat-linux-* /out; find /out' | |
echo "-- find --" | |
find out | |
- name: Publish BinCAT for Linux installer | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bincat-installer | |
path: out/bincat-linux-*.tar.xz | |
event_file: | |
name: "Event File" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Event File | |
path: ${{ github.event_path }} |