Skip to content

Commit

Permalink
Fix RacketCGC file location for scanbuild jobs (racket#3119)
Browse files Browse the repository at this point in the history
Re-enable scanbuild for 3m and CS, previously disabled in racket@9d89bbe

There is a GitHub Actions but where inside a container variables `$HOME`, `$GITHUB_WORKSPACE`, `{{ runner.temp }}` are not properly set. 

This commit contains some workaround that can be removed once a fix has been pushed from the GitHub side.
  • Loading branch information
Paulo Matos authored Apr 24, 2020
1 parent db1d191 commit cd096e0
Showing 1 changed file with 121 additions and 1 deletion.
122 changes: 121 additions & 1 deletion .github/workflows/ci-push.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CI

on: [push]
on: [push, pull_request]

jobs:

Expand Down Expand Up @@ -499,3 +499,123 @@ jobs:
name: scanbuild-cgc-${{ github.sha }}
path: racketcgc-report-${{ github.sha }}.tar.bz2

scanbuild-racket3m:

runs-on: ubuntu-latest
container: pmatos/scan-build:latest
needs: build-racketcgc

env:
RUNNER_TEMP: "/__w/_temp"

steps:
- name: Workaround temp issues
run: |
mkdir -p ${{ runner.temp }}
cd ${{ runner.temp }}/..
rmdir ${{ runner.temp }}
ln -s ${RUNNER_TEMP} ${{ runner.temp }}
- uses: actions/checkout@v1
with:
fetch-depth: 100
- name: Install dependencies
run: |
apt-get update
apt-get install -y libffi-dev unzip python libxml2-dev libfindbin-libs-perl make gcc g++
- uses: actions/download-artifact@v1
with:
name: racketcgc-ubuntu-18.04-cify-x64_git${{ github.sha }}
path: ${{ runner.temp }}
- name: Untar
working-directory: ${{ runner.temp }}
run: tar -xvjf racketcgc-ubuntu-18.04-cify-x64_git${{ github.sha }}.tar.bz2
- name: Configure
working-directory: ./racket/src
run: >
./configure
CFLAGS="-O0 -g"
--disable-strip
--prefix=${RUNNER_TEMP}/racket3m
--enable-racket=${RUNNER_TEMP}/racketcgc/bin/racket
--enable-werror
--enable-cify
--enable-jit
--enable-foreign
--enable-places
--enable-futures
--enable-float
--enable-pthread
--disable-docs
- name: Scan Build
working-directory: ./racket/src
run: |
export cpus=$(grep -c ^processor /proc/cpuinfo)
scan-build -o ../../racket3m-report -analyzer-config 'crosscheck-with-z3=true' make -j$((cpus + 1))
- name: Tarballing
run: tar -cvjf racket3m-report-${{ github.sha }}.tar.bz2 racket3m-report
- uses: actions/upload-artifact@v1
if: always()
with:
name: scanbuild-3m-${{ github.sha }}
path: racket3m-report-${{ github.sha }}.tar.bz2

scanbuild-racketcs:

runs-on: ubuntu-18.04
container: pmatos/scan-build:latest
needs: build-racketcgc

env:
RUNNER_TEMP: "/__w/_temp"

steps:
- name: Workaround temp issues
run: |
mkdir -p ${{ runner.temp }}
cd ${{ runner.temp }}/..
rmdir ${{ runner.temp }}
ln -s ${RUNNER_TEMP} ${{ runner.temp }}
- uses: actions/checkout@v1
with:
fetch-depth: 100
- name: Install pkg dependencies
run: |
apt update
apt install -y libffi-dev unzip python libxml2-dev libfindbin-libs-perl make gcc g++ git uuid-dev
- uses: actions/download-artifact@v1
with:
name: racketcgc-ubuntu-18.04-cify-x64_git${{ github.sha }}
path: ${{ runner.temp }}
- name: Untar
working-directory: ${{ runner.temp }}
run: tar -xvjf racketcgc-ubuntu-18.04-cify-x64_git${{ github.sha}}.tar.bz2
- name: Checking out ChezScheme
working-directory: ./racket/src
run: git clone --depth=1 --recurse-submodules -j3 https://github.com/racket/ChezScheme
- name: Configuring Racket CS
working-directory: ./racket/src
env:
CC: ${{ matrix.cc }}
run: >
./configure
CFLAGS="-O0 -g"
--prefix=${RUNNER_TEMP}/racketcs
$RACKET_EXTRA_CONFIGURE_ARGS
--enable-racket=${RUNNER_TEMP}/racketcgc/bin/racket
--enable-compress
--disable-docs
--enable-pthread
--enable-csdefault
--enable-csonly
- name: Building
working-directory: ./racket/src
run: |
export cpus=$(grep -c ^processor /proc/cpuinfo)
scan-build -o ../../racketcs-report -analyzer-config 'crosscheck-with-z3=true' make -j $((cpus+1))
- name: Tarballing
run: tar -cvjf racketcs-report-${{ github.sha }}.tar.bz2 racketcs-report
- uses: actions/upload-artifact@v1
if: always()
with:
name: scanbuild-cs-${{ github.sha }}
path: racketcs-report-${{ github.sha }}.tar.bz2

0 comments on commit cd096e0

Please sign in to comment.