replace markdown syntax block lang in the readme with shell-script, w… #76
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 | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: | |
- "master" | |
tags: | |
- "*" | |
pull_request: | |
branches: | |
- "*" | |
jobs: | |
build_linux: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 32 | |
steps: | |
- name: Clone polytracker repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
fetch-depth: 1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and export | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
tags: trailofbits/polytracker:latest | |
outputs: type=docker,dest=/tmp/polytracker.tar | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: polytracker docker image | |
path: /tmp/polytracker.tar | |
run_tests: | |
needs: build_linux | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 32 | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: polytracker docker image | |
path: /tmp | |
- name: Load image | |
run: docker load --input /tmp/polytracker.tar | |
- name: Run tests | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: trailofbits/polytracker:latest | |
run: pytest /polytracker/tests | |
build_example: | |
needs: build_linux | |
strategy: | |
matrix: | |
example: [mupdf, poppler, qpdf] | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 32 | |
steps: | |
- name: Clone polytracker repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
fetch-depth: 1 | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: polytracker docker image | |
path: /tmp | |
- name: Load image | |
run: docker load --input /tmp/polytracker.tar | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build ${{ matrix.example }} | |
uses: docker/build-push-action@v4 | |
with: | |
context: examples | |
file: examples/Dockerfile-${{ matrix.example }}.demo | |
tags: trailofbits/polytracker-demo-${{ matrix.example }}:latest | |
outputs: type=image,name=trailofbits/polytracker-demo-${{ matrix.example }}:latest |