Delete .github/workflows/verita_cognitive.yml #3
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: Verita - Formal Specification | |
on: | |
push: | |
branches: | |
- main # Run on main branch | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
openjml: | |
name: Run OpenJML | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
- name: Download OpenJML | |
run: | | |
sudo wget https://github.com/OpenJML/OpenJML/releases/download/0.21.0-alpha-0/openjml-ubuntu-22.04-0.21.0-alpha-0.zip -O /openjml-ubuntu-22.04-0.21.0-alpha-0.zip | |
sudo unzip /openjml-ubuntu-22.04-0.21.0-alpha-0.zip -d /OpenJML-0.21.0-alpha-0 | |
- name: Verify OpenJML installation | |
run: | | |
echo $PATH | |
/OpenJML-0.21.0-alpha-0/openjml -version | |
- name: clone git repo | |
run: | | |
REPO_URL="https://github.com/${GITHUB_REPOSITORY}.git" | |
git clone $REPO_URL src | |
cd src | |
- name: Identify Latest Changes | |
run: | | |
git log --name-only --pretty="" -n 1 | |
- name: Run OpenJML and save logs | |
run: | | |
shopt -s globstar | |
/OpenJML-0.21.0-alpha-0/openjml -esc -progress ./src/**/*.java ./src/*.java 2>&1 | tee openjml.log | |
echo "Logs have been saved to $(pwd)/openjml.log" | |
- name: Send OpenJML logs to verita | |
run: | | |
REPO_NAME=$(echo $GITHUB_REPOSITORY) | |
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) | |
COMMIT_ID=$(git rev-parse --short HEAD) | |
FILE_NAME="log_${GITHUB_REPOSITORY//\//_}_${BRANCH_NAME}_${COMMIT_ID}.log" | |
sudo curl --location 'https://verita-logger-api.dpacks.net' \ | |
--header 'x-api-key: 248frv384' \ | |
--form "filename=${FILE_NAME}" \ | |
--form "repository=${REPO_NAME}" \ | |
--form "branch=main" \ | |
--form "commit_id=${COMMIT_ID}" \ | |
--form "file=@$(pwd)/openjml.log" |