From 5b298265150f0257a7e99d55d33ce48d001fabdb Mon Sep 17 00:00:00 2001 From: Shaun Eccles-Smith Date: Sat, 21 Dec 2024 14:50:02 +1100 Subject: [PATCH] Harmonize CI build steps and update codeql --- .github/workflows/ci-build.yml | 33 +++++--------- .github/workflows/codeql-analysis.yml | 63 +-------------------------- 2 files changed, 11 insertions(+), 85 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 881e418ee..13b786ab7 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -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: | @@ -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 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 960d46dde..ab5c00575 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -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 @@ -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 \ No newline at end of file