Skip to content

Commit

Permalink
Add a CI workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
fruffy committed Jul 8, 2023
1 parent f5170fc commit f719c74
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Cancel any preceding run on the pull request.
concurrency:
group: p4dummy-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ matrix.os }}
max-size: 1000M
- name: Install P4C with P4Dummy.
run: |
git clone https://github.com/p4lang/p4c $GITHUB_WORKSPACE/../p4c
cd $GITHUB_WORKSPACE/../p4c
git submodule update --init --recursive
mkdir -p $GITHUB_WORKSPACE/../p4c/extensions/
cp -r $GITHUB_WORKSPACE $GITHUB_WORKSPACE/../p4c/extensions/p4dummy
ln -sf $GITHUB_WORKSPACE $GITHUB_WORKSPACE/../p4c/extensions/p4dummy
$GITHUB_WORKSPACE/../p4c/tools/ci-build.sh

0 comments on commit f719c74

Please sign in to comment.