X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=.github%2Fworkflows%2Fmain.yml;h=a2825cf9fb4b1fe0315b7eb3e62d2d382fb21d41;hb=d782bdd48e0a3dd500496d64904e2981755a7ebb;hp=203da3f42a6dbde839fcb442d0f0f59d7fd964cf;hpb=eeb0b9ee58eec087b0bd7b5b3428b4c9d1078c4a;p=kconfig-hardened-check.git diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 203da3f..a2825cf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: max-parallel: 4 fail-fast: false matrix: - python-version: [3.6, 3.7, 3.8] + python-version: [3.6, 3.7, 3.8, 3.9] # github runner with python 3.5 currently fails to install this package steps: @@ -30,13 +30,14 @@ jobs: python -m pip install --upgrade pip pip install coverage pip --verbose install git+https://github.com/a13xp0p0v/kconfig-hardened-check + echo ">>>>> first start <<<<<" kconfig-hardened-check - - name: Check all configs + - name: Check all configs with the installed tool run: | echo ">>>>> check all configs <<<<<" CONFIG_DIR=`find /opt/hostedtoolcache/Python/ -name config_files` - CONFIGS=`find $CONFIG_DIR -type f|grep "\.config"` + CONFIGS=`find $CONFIG_DIR -type f | grep "\.config"` COUNT=0 for C in $CONFIGS do @@ -46,13 +47,19 @@ jobs: done echo -e "\n>>>>> checking $COUNT configs is done <<<<<" - - name: Get source code + - name: Get source code for collecting coverage uses: actions/checkout@v2 - name: Collect coverage run: | + echo ">>>>> get help <<<<<" coverage run -a --branch bin/kconfig-hardened-check + coverage run -a --branch bin/kconfig-hardened-check -h + echo ">>>>> get version <<<<<" + coverage run -a --branch bin/kconfig-hardened-check --version + + echo ">>>>> print the security hardening preferences <<<<<" coverage run -a --branch bin/kconfig-hardened-check -p X86_64 coverage run -a --branch bin/kconfig-hardened-check -p X86_64 -m verbose coverage run -a --branch bin/kconfig-hardened-check -p X86_64 -m json @@ -69,14 +76,21 @@ jobs: coverage run -a --branch bin/kconfig-hardened-check -p ARM -m verbose coverage run -a --branch bin/kconfig-hardened-check -p ARM -m json - CONFIG_DIR=`find /opt/hostedtoolcache/Python/ -name config_files` - CONFIGS=`find $CONFIG_DIR -type f|grep "\.config"` + echo ">>>>> check the example kconfig files <<<<<" + CONFIG_DIR=`find . -name config_files` + CONFIGS=`find $CONFIG_DIR -type f | grep "\.config"` + COUNT=0 for C in $CONFIGS do + COUNT=$(expr $COUNT + 1) + echo -e "\n>>>>> checking config number $COUNT <<<<<" coverage run -a --branch bin/kconfig-hardened-check -c $C - coverage run -a --branch bin/kconfig-hardened-check -c $C -m verbose + coverage run -a --branch bin/kconfig-hardened-check -c $C -m verbose > /dev/null coverage run -a --branch bin/kconfig-hardened-check -c $C -m json + coverage run -a --branch bin/kconfig-hardened-check -c $C -m show_ok + coverage run -a --branch bin/kconfig-hardened-check -c $C -m show_fail done + echo -e "\n>>>>> checking $COUNT configs is done <<<<<" coverage xml -i -o coverage.xml - name: Handle coverage