forked from google/brotli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
97 changed files
with
7,116 additions
and
2,118 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ "master" ] | ||
schedule: | ||
- cron: '18 15 * * 0' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | ||
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: 'ubuntu-latest' | ||
timeout-minutes: 360 | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'cpp', 'java', 'javascript', 'python' ] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# CodeQL is currently crashing on files with large lists: | ||
# https://github.com/github/codeql/issues/13656 | ||
config: | | ||
paths-ignore: | ||
- research | ||
- js/test_data.* | ||
- if: matrix.language == 'cpp' | ||
name: Build CPP | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
- if: matrix.language == 'cpp' || matrix.language == 'java' | ||
name: Build Java | ||
run: | | ||
cd ${GITHUB_WORKSPACE}/java | ||
bazelisk build --spawn_strategy=local --nouse_action_cache -c opt ...:all | ||
- if: matrix.language == 'javascript' | ||
name: Build JS | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
- if: matrix.language == 'cpp' || matrix.language == 'python' | ||
name: Build Python | ||
run: | | ||
python setup.py build_ext | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
category: "/language:${{matrix.language}}" |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
# Copyright 2023 Google Inc. All Rights Reserved. | ||
# | ||
# Distributed under MIT license. | ||
# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT | ||
|
||
# Workflow for building the release binaries. | ||
|
||
name: Release build / deploy | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- v*.*.* | ||
release: | ||
types: [ published ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | ||
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
||
jobs: | ||
windows_build: | ||
name: Windows Build (vcpkg / ${{ matrix.triplet }}) | ||
runs-on: [windows-2022] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- triplet: x86-windows-dynamic | ||
arch: '-A Win32' | ||
build_shared_libs: 'ON' | ||
- triplet: x64-windows-dynamic | ||
arch: '-A x64' | ||
build_shared_libs: 'ON' | ||
- triplet: x86-windows-static | ||
arch: '-A Win32' | ||
build_shared_libs: 'OFF' | ||
- triplet: x64-windows-static | ||
arch: '-A x64' | ||
build_shared_libs: 'OFF' | ||
|
||
env: | ||
VCPKG_VERSION: '2022.11.14' | ||
VCPKG_ROOT: vcpkg | ||
VCPKG_DISABLE_METRICS: 1 | ||
|
||
steps: | ||
- name: Checkout the source | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: false | ||
fetch-depth: 1 | ||
|
||
- uses: actions/cache@v3 | ||
id: cache-vcpkg | ||
with: | ||
path: vcpkg | ||
key: release-${{ runner.os }}-vcpkg-${{ env.VCPKG_VERSION }}-${{ matrix.triplet }} | ||
|
||
- name: Download vcpkg | ||
if: steps.cache-vcpkg.outputs.cache-hit != 'true' | ||
# wget doesn't seem to work under bash. | ||
shell: 'powershell' | ||
run: | | ||
C:\msys64\usr\bin\wget.exe -nv ` | ||
https://github.com/microsoft/vcpkg/archive/refs/tags/${{ env.VCPKG_VERSION }}.zip ` | ||
-O vcpkg.zip | ||
- name: Bootstrap vcpkg | ||
if: steps.cache-vcpkg.outputs.cache-hit != 'true' | ||
shell: 'bash' | ||
run: | | ||
set -x | ||
unzip -q vcpkg.zip | ||
rm -rf ${VCPKG_ROOT} | ||
mv vcpkg-${VCPKG_VERSION} ${VCPKG_ROOT} | ||
${VCPKG_ROOT}/bootstrap-vcpkg.sh | ||
- name: Configure | ||
shell: 'bash' | ||
run: | | ||
set -x | ||
mkdir out | ||
cmake -Bout -H. ${{ matrix.arch }} \ | ||
-DBUILD_TESTING=OFF \ | ||
-DBUILD_SHARED_LIBS=${{ matrix.build_shared_libs }} \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_PREFIX=`pwd`/prefix \ | ||
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake \ | ||
-DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} \ | ||
# | ||
- name: Build | ||
shell: 'bash' | ||
run: | | ||
set -x | ||
cmake --build out --config Release | ||
- name: Install | ||
shell: 'bash' | ||
run: | | ||
set -x | ||
cmake --build out --config Release --target install | ||
cp LICENSE prefix/bin/LICENSE.brotli | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: brotli-${{matrix.triplet}} | ||
path: | | ||
prefix/bin/* | ||
- name: Package release zip | ||
if: github.event_name == 'release' | ||
shell: 'powershell' | ||
run: | | ||
Compress-Archive -Path prefix\bin\* ` | ||
-DestinationPath brotli-${{matrix.triplet}}.zip | ||
- name: Upload binaries to release | ||
if: github.event_name == 'release' | ||
uses: AButler/upload-release-assets@v2.0 | ||
with: | ||
files: brotli-${{matrix.triplet}}.zip | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.