Pārlūkot izejas kodu

Merge pull request #6413 from aspargas2/1.2-maint

Backport: fix codeql complaining about missing headers needed by borg
TW 3 gadi atpakaļ
vecāks
revīzija
20a9df18f7
1 mainītis faili ar 22 papildinājumiem un 20 dzēšanām
  1. 22 20
      .github/workflows/codeql-analysis.yml

+ 22 - 20
.github/workflows/codeql-analysis.yml

@@ -33,17 +33,10 @@ jobs:
       with:
         # just fetching 1 commit is not enough for setuptools-scm, so we fetch all
         fetch-depth: 0
-
-    # Initializes the CodeQL tools for scanning.
-    - name: Initialize CodeQL
-      uses: github/codeql-action/init@v1
+    - name: Set up Python
+      uses: actions/setup-python@v2
       with:
-        languages: ${{ matrix.language }}
-        # If you wish to specify custom queries, you can do so here or in a config file.
-        # By default, queries listed here will override any specified in a config file.
-        # Prefix the list here with "+" to use these queries and those in the config file.
-        # queries: ./path/to/local/query, your-org/your-repo/queries@main
-
+        python-version: 3.8
     - name: Cache pip
       uses: actions/cache@v2
       with:
@@ -52,16 +45,25 @@ jobs:
         restore-keys: |
             ${{ runner.os }}-pip-
             ${{ runner.os }}-
-
-    # ℹ️ Command-line programs to run using the OS shell.
-    # 📚 https://git.io/JvXDl
-
-    - name: Install requirements, build and install Borg
+    - name: Install requirements
       run: |
-       sudo apt-get update
-       sudo apt-get install libacl1-dev
-       pip3 install -r requirements.d/development.txt
-       pip3 install -e .
-
+        sudo apt-get update
+        sudo apt-get install -y pkg-config build-essential
+        sudo apt-get install -y libssl-dev libacl1-dev libxxhash-dev liblz4-dev libzstd-dev
+    # Initializes the CodeQL tools for scanning.
+    - name: Initialize CodeQL
+      uses: github/codeql-action/init@v1
+      with:
+        languages: ${{ matrix.language }}
+        # If you wish to specify custom queries, you can do so here or in a config file.
+        # By default, queries listed here will override any specified in a config file.
+        # Prefix the list here with "+" to use these queries and those in the config file.
+        # queries: ./path/to/local/query, your-org/your-repo/queries@main
+    - name: Build and install Borg
+      run: |
+        python3 -m venv ../borg-env
+        source ../borg-env/bin/activate
+        pip3 install -r requirements.d/development.txt
+        pip3 install -e .
     - name: Perform CodeQL Analysis
       uses: github/codeql-action/analyze@v1