├── README.md └── .github └── workflows └── coverity-scan.yml /README.md: -------------------------------------------------------------------------------- 1 | This is a dummy repository to apply [Coverity Scan](https://scan.coverity.com/) to the source code of ruby/ruby in GitHub Actions. 2 | 3 | The analysis result is available in ["ruby" project in Coverity Scan](https://scan.coverity.com/projects/ruby). 4 | 5 | NOTE: You need to be a Ruby committer to see the result. (See [the FAQ of Coverity Scan](https://scan.coverity.com/faq#who-can-have-access).) 6 | If you are a committer and you want to see it, please contact on @mame. 7 | -------------------------------------------------------------------------------- /.github/workflows/coverity-scan.yml: -------------------------------------------------------------------------------- 1 | name: coverity-scan 2 | on: 3 | schedule: 4 | - cron: '0 18 * * *' # Daily at 18:00 UTC 5 | workflow_dispatch: 6 | 7 | jobs: 8 | latest: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Install libraries 12 | run: | 13 | set -x 14 | sudo sed /etc/apt/sources.list -e "s/^# deb-src/deb-src/g" -i 15 | sudo apt-get update 16 | sudo apt-get install ruby 17 | sudo apt-get build-dep ruby 18 | 19 | - name: Checkout ruby/ruby 20 | run: | 21 | git clone --depth=1 https://github.com/ruby/ruby . 22 | 23 | - name: Download Coverity Build Tool 24 | run: | 25 | wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=ruby" -O cov-analysis-linux64.tar.gz 26 | mkdir cov-analysis-linux64 27 | tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64 28 | env: 29 | TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} 30 | 31 | - name: Fixed world writable dirs 32 | run: | 33 | chmod go-w $HOME 34 | sudo chmod -R go-w /usr/share 35 | 36 | - name: Run autoconf 37 | run: autoconf 38 | 39 | - name: Configure 40 | run: ./configure 41 | 42 | - name: Build with cov-build 43 | run: | 44 | export PATH=`pwd`/cov-analysis-linux64/bin:$PATH 45 | cov-build --dir cov-int make 46 | 47 | - name: Submit the result to Coverity Scan 48 | run: | 49 | tar czvf ruby.tgz cov-int 50 | curl \ 51 | --form project=ruby \ 52 | --form token=$TOKEN \ 53 | --form email=mame@ruby-lang.org \ 54 | --form file=@ruby.tgz \ 55 | --form version=trunk \ 56 | --form description="`./ruby -v`" \ 57 | https://scan.coverity.com/builds?project=ruby 58 | env: 59 | TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} 60 | --------------------------------------------------------------------------------