enso/.github/workflows/codeql-analysis.yml

96 lines
2.8 KiB
YAML
Raw Normal View History

2020-07-01 18:17:24 +03:00
name: "CodeQL"
# CodeQL is temporarily disabled because it seems that it is unable to discover
# code compiled with SBT.
2020-07-01 18:17:24 +03:00
on:
2020-07-02 18:23:34 +03:00
push:
branches-ignore:
- "**"
# branches:
# - main
# - "release/*"
2020-07-01 18:17:24 +03:00
pull_request:
branches-ignore:
- "**"
# branches:
# - "*"
2020-07-01 18:17:24 +03:00
env:
# Please ensure that this is in sync with graalVersion in build.sbt
2020-08-28 14:03:09 +03:00
graalVersion: 20.2.0
# Please ensure that this is in sync with javaVersion in build.sbt
javaVersion: 11
2020-07-01 18:17:24 +03:00
# Please ensure that this is in sync with project/build.properties
sbtVersion: 1.4.1
# Please ensure that this is in sync with rustVersion in build.sbt
rustToolchain: nightly-2019-11-04
2020-07-01 18:17:24 +03:00
jobs:
vuln-scan:
name: Vulnerability Scan
runs-on: ubuntu-latest
steps:
2020-07-21 15:59:40 +03:00
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
2020-07-01 18:17:24 +03:00
2020-07-21 15:59:40 +03:00
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
2020-07-01 18:17:24 +03:00
2020-07-21 15:59:40 +03:00
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: java
2020-07-01 18:17:24 +03:00
2020-07-21 15:59:40 +03:00
# Set Up Environment
- name: Install Rust
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: ${{ env.rustToolchain }}
override: true
2020-07-21 15:59:40 +03:00
- name: Setup conda
uses: s-weigand/setup-conda@v1.0.5
2020-07-21 15:59:40 +03:00
with:
update-conda: false
conda-channels: anaconda, conda-forge
- name: Install FlatBuffers Compiler
run: conda install --freeze-installed flatbuffers=1.12.0
- name: Setup GraalVM Environment
uses: ayltai/setup-graalvm@v1
2020-07-21 15:59:40 +03:00
with:
graalvm-version: ${{ env.graalVersion }}
java-version: ${{ env.javaVersion }}
2020-07-21 15:59:40 +03:00
- name: Set Up SBT
run: |
curl --retry 4 --retry-connrefused -fsSL -o sbt.tgz https://github.com/sbt/sbt/releases/download/v${{env.sbtVersion}}/sbt-${{env.sbtVersion}}.tgz
2020-07-01 18:17:24 +03:00
tar -xzf sbt.tgz
echo $GITHUB_WORKSPACE/sbt/bin/ >> $GITHUB_PATH
2020-07-01 18:17:24 +03:00
2020-07-21 15:59:40 +03:00
# Caches
- name: Cache SBT
uses: actions/cache@v2
with:
path: |
~/.sbt
~/.ivy2/cache
~/.cache
key: ${{ runner.os }}-sbt-${{ hashFiles('**build.sbt') }}
restore-keys: ${{ runner.os }}-sbt-
2020-07-01 18:17:24 +03:00
2020-07-21 15:59:40 +03:00
# Build
- name: Bootstrap Enso project
run: sbt --no-colors bootstrap
- name: Build Enso
run: sbt --no-colors compile
2020-07-01 18:17:24 +03:00
2020-07-21 15:59:40 +03:00
# Analyse the Code
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1