Skip to content

Commit

Permalink
Harmonize CI build steps and update codeql
Browse files Browse the repository at this point in the history
  • Loading branch information
shauneccles committed Dec 21, 2024
1 parent 737bc43 commit 5b29826
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 85 deletions.
33 changes: 10 additions & 23 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,19 +119,13 @@ jobs:
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Setup environment variables
run: |
export PKG_CONFIG_PATH="/opt/homebrew/opt/mbedtls@2/lib/pkgconfig"
export CFLAGS="-Wno-incompatible-function-pointer-types"
export PATH="/opt/homebrew/opt/mbedtls@2/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/mbedtls@2/lib"
export CPPFLAGS="-I/opt/homebrew/opt/mbedtls@2/include"
export DYLD_FALLBACK_LIBRARY_PATH="/opt/homebrew/lib"
- name: Install LedFx
run: |
uv sync --all-extras --dev
export PATH="/opt/homebrew/opt/mbedtls@2/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/mbedtls@2/lib"
export CPPFLAGS="-I/opt/homebrew/opt/mbedtls@2/include"
export CFLAGS="-Wno-incompatible-function-pointer-types"
uv sync --python ${{ matrix.python-version }} --extra hue --dev
- name: Check LedFx launches
run: |
Expand Down Expand Up @@ -163,20 +157,13 @@ jobs:
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Setup environment variables
run: |
export PKG_CONFIG_PATH="/opt/homebrew/opt/mbedtls@2/lib/pkgconfig"
export CFLAGS="-Wno-incompatible-function-pointer-types"
export PATH="/opt/homebrew/opt/mbedtls@2/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/mbedtls@2/lib"
export CPPFLAGS="-I/opt/homebrew/opt/mbedtls@2/include"
export DYLD_FALLBACK_LIBRARY_PATH="/opt/homebrew/lib"
- name: Install LedFx
run: |
uv sync --all-extras --dev
export PATH="/opt/homebrew/opt/mbedtls@2/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/mbedtls@2/lib"
export CPPFLAGS="-I/opt/homebrew/opt/mbedtls@2/include"
export CFLAGS="-Wno-incompatible-function-pointer-types"
uv sync --python ${{ matrix.python-version }} --extra hue --dev
- name: Check LedFx launches
run: |
uv run ledfx --ci-smoke-test -vv -c debug_config --offline
Expand Down
63 changes: 1 addition & 62 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,35 +32,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update && sudo apt-get install -y portaudio19-dev libatlas3-base
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v5
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v4
with:
path: venv
key: >-
${{ env.CACHE_VERSION }}-${{ runner.os }}-base-venv-${{
steps.python.outputs.python-version }}-${{
hashFiles('requirements-dev.txt') }}
restore-keys: |
${{ env.CACHE_VERSION }}-${{ runner.os }}-base-venv-${{ steps.python.outputs.python-version }}-${{hashFiles('requirements-dev.txt') }}-
${{ env.CACHE_VERSION }}-${{ runner.os }}-base-venv-${{ steps.python.outputs.python-version }}-
- name: Create Python virtual environment
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
python -m venv venv
. venv/bin/activate
pipx install poetry
poetry install --no-root --with dev
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
# Initializes the CodeQL tools for scanning
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand All @@ -69,38 +40,6 @@ jobs:
# Override the default behavior so that the action doesn't attempt
# to auto-install Python dependencies
setup-python-dependencies: false
- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

analyze-javascript:
name: Analyze Javascript
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v3

0 comments on commit 5b29826

Please sign in to comment.