Skip to content

Commit

Permalink
manual compiling instead of cibuild script
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoSairiala committed Apr 8, 2024
1 parent f0a2551 commit 9278079
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 17 deletions.
36 changes: 26 additions & 10 deletions .github/workflows/CodeQL.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: "CodeQL"

on:
workflow_call:
push:
workflow_dispatch:

jobs:
analyze:
Expand All @@ -27,6 +28,10 @@ jobs:
include:
- language: c-cpp
build-mode: manual
config: icicle:nsh
- language: c-cpp
build-mode: manual
config: imx93-evk:nsh
- language: python
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
Expand All @@ -40,12 +45,23 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download Source Artifact
uses: actions/download-artifact@v4
- name: Checkout apps
uses: actions/checkout@v4
with:
name: source-bundle
path: .
repository: 'tiiuae/incubator-nuttx-apps.git'
path: 'apps'
ref: 'master'

- name: Install tools
run: |
mv apps ../apps
sudo apt-get install kconfig-frontends
mkdir -p ../bin
cd ../bin
wget https://static.dev.sifive.com/dev-tools/freedom-tools/v2020.12/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz
wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-elf.tar.xz
tar xvf riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz
tar xvf arm-gnu-toolchain-13.2.rel1-x86_64-aarch64-none-elf.tar.xz
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand All @@ -68,10 +84,10 @@ jobs:
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
run: |
echo "::add-matcher::nuttx/.github/gcc.json"
export ARTIFACTDIR=`pwd`/buildartifacts
cd nuttx/tools/ci
./cibuild.sh -i -c -A -R testlist/ssrc-riscv.dat
export PATH=$PATH:$PWD/../bin/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin/
export PATH=$PATH:$PWD/../bin/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-elf/bin
./tools/configure.sh ${{matrix.config}}
make
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,13 @@ jobs:
uses: actions/download-artifact@v4
with:
name: source-bundle
path: sources
path: .

# cibuild.sh -i installs the tools for us
- name: Run builds
run: |
echo "::add-matcher::sources/nuttx/.github/gcc.json"
echo "::add-matcher::nuttx/.github/gcc.json"
export ARTIFACTDIR=`pwd`/buildartifacts
cd sources/nuttx/tools/ci
cd nuttx/tools/ci
./cibuild.sh -i -c -A -R testlist/${{matrix.boards}}.dat
CodeQL:
needs: Fetch-Source
uses: "./.github/workflows/CodeQL.yml"

0 comments on commit 9278079

Please sign in to comment.