Check Style #1
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: Check Style | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
compile_job: | |
name: style_all | |
runs-on: ubuntu-latest | |
container: | |
image: dinkelk/adamant:example-latest | |
credentials: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
env: | |
INSTALL_DIR: /home/user/env | |
ADAMANT_DIR: ${{ github.workspace }} | |
ADAMANT_CONFIGURATION_YAML: ${{ github.workspace }}/config/adamant.configuration.yaml | |
steps: | |
- run: echo "Starting job triggered by a ${{ github.event_name }} event on a ${{ runner.os }} server hosted by GitHub." | |
- run: echo "Checking out ${{ github.repository }} on branch ${{ github.ref }}." | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Mark repository as safe so we can run git commands within it | |
run: git config --global --add safe.directory $ADAMANT_DIR | |
- name: Get alire dependencies | |
run: alr -n build --release && alr -n toolchain --select gnat_native && alr -n toolchain --select gprbuild | |
- name: Set up Adamant configuration file | |
run: cp config/adamant.configuration.yaml.original config/adamant.configuration.yaml | |
- name: Check all style | |
run: bash env/github_run.sh "redo style_all" | |
continue-on-error: true | |
- name: Archive logs for failed style checks | |
if: always() # Make sure this runs even if `redo style_all` fails | |
uses: actions/upload-artifact@v3 | |
with: | |
name: failed_style_logs | |
path: build/failed_style_logs | |
if-no-files-found: ignore | |
- run: echo "Finished with status - ${{ job.status }}." | |
if: always() |