new update #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CodeQL" | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
analyze: | |
name: Analyze | |
runs-on: ${{ matrix.language == 'swift' && 'macos-latest' || 'ubuntu-latest' }} | |
timeout-minutes: ${{ matrix.language == 'swift' && 120 || 360 }} | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
strategy: | |
fail-fast: false | |
matrix: | |
language: [ 'csharp', 'javascript-typescript' ] | |
dot-version: ['3.1.x'] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
libssl-dev \ | |
libicu-dev \ | |
ca-certificates \ | |
openssl \ | |
curl \ | |
pkg-config \ | |
zlib1g-dev | |
- name: Check OpenSSL installation | |
run: | | |
openssl version | |
ldconfig -p | grep libssl | |
- name: Set System.Globalization.Invariant to true | |
run: echo "DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1" >> $GITHUB_ENV | |
- name: Setup dotnet ${{ matrix.dot-version }} | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ matrix.dot-version }} | |
- name: Display dotnet version | |
run: dotnet --version | |
- name: Manually Set LD_LIBRARY_PATH | |
run: | | |
echo "/usr/lib/ssl" >> $GITHUB_ENV | |
export LD_LIBRARY_PATH=/usr/lib/ssl:$LD_LIBRARY_PATH | |
- name: Run dotnet restore with verbose logging | |
run: dotnet restore --verbosity detailed | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: ${{ matrix.language }} | |
- name: Build the C# project | |
if: matrix.language == 'csharp' | |
run: | | |
dotnet restore | |
dotnet build --configuration Release | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
with: | |
category: "/language:${{matrix.language}}" |