Skip to content

Commit

Permalink
bla
Browse files Browse the repository at this point in the history
  • Loading branch information
surovic committed Aug 17, 2023
1 parent a4fdb96 commit ed604f6
Showing 1 changed file with 99 additions and 0 deletions.
99 changes: 99 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
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@v3
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@v3
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@v3
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

0 comments on commit ed604f6

Please sign in to comment.