Replace LLVMREwriteEvent
with llvm_rewrite_event
#1820
Workflow file for this run
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: "Run LLVM backend tests" | |
on: | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
version-bump: | |
name: 'Version Bump' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.JENKINS_GITHUB_PAT }} | |
# fetch-depth 0 means deep clone the repo | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: 'Configure GitHub user' | |
run: | | |
git config user.name devops | |
git config user.email devops@runtimeverification.com | |
- name: 'Update version' | |
run: | | |
og_version=$(git show origin/${GITHUB_BASE_REF}:package/version) | |
./package/version.sh bump ${og_version} | |
./package/version.sh sub | |
new_version=$(cat package/version) | |
git add --update && git commit --message "Set Version: ${new_version}" || true | |
- name: 'Push updates' | |
run: git push origin HEAD:${GITHUB_HEAD_REF} | |
compile-nix-flake: | |
name: 'Nix flake' | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- runner: [self-hosted, linux, normal] | |
os: ubuntu-20.04 | |
- runner: macos-12 | |
os: macos-12 | |
- runner: MacM1 | |
os: self-macos-12 | |
runs-on: ${{ matrix.runner }} | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v4 | |
with: | |
# Check out pull request HEAD instead of merge commit. | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: 'Install Nix' | |
if: ${{ !startsWith(matrix.os, 'self') }} | |
uses: cachix/install-nix-action@v22 | |
with: | |
install_url: https://releases.nixos.org/nix/nix-2.13.3/install | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- name: 'Install Cachix' | |
uses: cachix/cachix-action@v12 | |
with: | |
name: k-framework | |
authToken: '${{ secrets.CACHIX_PUBLIC_TOKEN }}' | |
skipPush: true | |
- name: 'Build LLVM backend' | |
run: GC_DONT_GC=1 nix build --print-build-logs . | |
- name: 'Build pattern matching compiler' | |
run: GC_DONT_GC=1 nix build --print-build-logs .#llvm-backend-matching | |
- name: 'Test LLVM backend' | |
run: GC_DONT_GC=1 nix flake check --print-build-logs | |
- name: 'Push Flake to Cachix' | |
run: | | |
GC_DONT_GC=1 nix build --print-build-logs . --json \ | |
| jq -r '.[].outputs | to_entries[].value' \ | |
| cachix push k-framework | |
build-from-source: | |
name: 'Build LLVM backend from source' | |
runs-on: [self-hosted, linux, normal] | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: 'Set up Docker' | |
uses: ./.github/actions/with-docker | |
with: | |
tag: llvm-backend-ci-${{ github.sha }} | |
os: ubuntu | |
distro: jammy | |
llvm: 15 | |
- name: 'Run backend tests' | |
run: | | |
docker exec -t llvm-backend-ci-${GITHUB_SHA} .github/workflows/ci-tests.sh | |
- name: 'Tear down Docker' | |
if: always() | |
run: | | |
docker stop --time=0 llvm-backend-ci-${GITHUB_SHA} | |
docker container rm --force llvm-backend-ci-${GITHUB_SHA} || true | |
build-jammy-package: | |
name: 'Build Ubuntu Jammy package' | |
runs-on: [self-hosted, linux, normal] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 'Check out code' | |
uses: actions/checkout@v4 | |
with: | |
path: k-llvm-jammy | |
submodules: recursive | |
- name: 'Build package in Docker' | |
uses: ./.github/actions/test-package | |
with: | |
os: ubuntu | |
distro: jammy | |
llvm: 15 | |
build-package: package/debian/build-package jammy | |
test-package: package/debian/test-package |