Files
concrete/.github/workflows/llvm-compatibility.yml
2021-10-09 11:44:46 +01:00

61 lines
2.0 KiB
YAML

name: LLVM Compatibility
on:
workflow_dispatch:
schedule:
- cron: '0 00 * * 1' # Every Monday @ 00:00 UTC
jobs:
build_test:
name: Build & test the Docker image with latest LLVM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Update LLVM
id: update-llvm
run: |
git submodule update --remote
echo "::set-output name=commit::$(cd llvm-project && git rev-parse --short HEAD)"
- name: Log LLVM commit
run: echo "LLVM commit" && cd ${{ github.workspace }}/llvm-project && git log -1
- name: login
run: echo "${{ secrets.GHCR_PASSWORD }}" | docker login -u ${{ secrets.GHCR_LOGIN }} --password-stdin ghcr.io
- name: Build
run: docker image build --no-cache -t compiler-latest-llvm -f builders/Dockerfile.zamalang-env .
- name: Test compiler with latest LLVM
uses: addnab/docker-run-action@v3
with:
image: compiler-latest-llvm
run: |
cd /compiler
pip install pytest
make BUILD_DIR=/build test
- name: Commit latest LLVM version
uses: EndBug/add-and-commit@v7
with:
add: ./llvm-project
default_author: github_actions
message: "chore: update LLVM to ${{ steps.update-llvm.outputs.commit }}"
- name: Send Slack Notification
if: ${{ always() }}
continue-on-error: true
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7
env:
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
SLACK_ICON: https://pbs.twimg.com/profile_images/1274014582265298945/OjBKP9kn_400x400.png
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: "Compatibility check with latest LLVM finished with status ${{ job.status }} \
(${{ env.ACTION_RUN_URL }})"
SLACK_USERNAME: ${{ secrets.BOT_USERNAME }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}