Skip to content

Commit

Permalink
actions: TICS job cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiubelu committed Jan 20, 2025
1 parent ec1cf68 commit 571c33f
Showing 1 changed file with 35 additions and 14 deletions.
49 changes: 35 additions & 14 deletions .github/workflows/tiobe-tics-cron.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
name: Tiobe TiCS nightly report
name: Tiobe TICS nightly report

on:
workflow_dispatch:
schedule:
- cron: '0 10 * * *'
pull_request:
paths:
- .github/workflows/tiobe-tics-cron.yaml


permissions:
contents: read

jobs:
TiCS:
TICS:
permissions:
contents: read
runs-on: ubuntu-latest
Expand All @@ -27,8 +30,16 @@ jobs:

- name: Checking out repo
uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
ref: ${{matrix.branch}}
python-version: '3.12'

- name: Install Python dependencies
run: |
# pylint and flake8 are required by TICSQServer.
pip install pylint flake8
pip install -r test/performance/requirements-test.txt
- name: Install Go
uses: actions/setup-go@v5
Expand All @@ -43,14 +54,11 @@ jobs:
set -eux -o pipefail
# TiCS requires us to have the test results in cobertura xml format under the
# directory use below
# directory used below
sudo make go.coverage
go install github.com/boumenot/gocover-cobertura@latest
gocover-cobertura < coverage.txt > coverage.xml
mkdir .coverage
mv ./coverage.xml ./.coverage/
cat ./.coverage/coverage.xml
mkdir -p .coverage
gocover-cobertura < coverage.txt > .coverage/coverage.xml
- name: Build Project
run: |
Expand All @@ -59,21 +67,34 @@ jobs:
# We load the dqlite libs here instead of doing through make because TICS
# will try to build parts of the project itself
sudo add-apt-repository -y ppa:dqlite/dev
sudo apt install dqlite-tools libdqlite-dev -y
sudo apt install libdqlite1.17-dev
# We need to have our project built
sudo make clean
sudo make -j static
- name: Install and Run TiCS
run: |
export TICSAUTHTOKEN=${{ secrets.TICSAUTHTOKEN }}
# NOTE(aznashwan): TiCS install script doesn't define defaults; cannot '-u'
set -ex -o pipefail
export TICSAUTHTOKEN=${{ secrets.TICSAUTHTOKEN }}
# Install the TICS and staticcheck
go install honnef.co/go/tools/cmd/[email protected]
. <(curl --silent --show-error 'https://canonical.tiobe.com/tiobeweb/TICS/api/public/v1/fapi/installtics/Script?cfg=default&platform=linux&url=https://canonical.tiobe.com/tiobeweb/TICS/')
TICSQServer -project k8s-dqlite -tmpdir /tmp/tics -branchdir $HOME/work/k8s-dqlite/k8s-dqlite/
# Performance tests are importing a local test_util module. Needed for pylint.
export PYTHONPATH="$(pwd)/test/performance/tests/"
# TICSQServer will try to build the project. We need a few environment variables
# for it to succeed. Based on make static / "hack/static-dqlite.sh".
export INSTALL_DIR="$(pwd)/hack/.deps/static"
export PATH="${PATH}:${INSTALL_DIR}/musl/bin"
export CC=musl-gcc
export CGO_CFLAGS="-I${INSTALL_DIR}/include"
export CGO_LDFLAGS="-L${INSTALL_DIR}/lib -luv -ldqlite -llz4 -lsqlite3 -Wl,-z,stack-size=1048576"
TICSQServer -project ${{ github.event.repository.name }} -tmpdir /tmp/tics -branchdir "$GITHUB_WORKSPACE"
cat /tmp/tics/ticstmpdir/Coverity/cov-build-console.log

0 comments on commit 571c33f

Please sign in to comment.