Skip to content

Commit

Permalink
zlib: add support for zip archives
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanis committed Jan 6, 2023
1 parent 6668c4d commit 396157c
Show file tree
Hide file tree
Showing 854 changed files with 71,988 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ permissions:

jobs:
test-linux:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -45,5 +44,9 @@ jobs:
run: npx envinfo
- name: Build
run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn"
- uses: actions/upload-artifact@v3
with:
name: build
path: out/Release/node
- name: Test
run: make run-ci -j2 V=1 TEST_CI_ARGS="-p actions --measure-flakiness 9"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ _UpgradeReport_Files/
/deps/icu*.zip
/deps/icu*.tgz
/deps/icu-tmp
/deps/libzip/build
./node_modules
/android-toolchain/
# generated by gyp on Windows
Expand Down
7 changes: 7 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,12 @@
default=None,
help='link to a shared libuv DLL instead of static linking')

shared_optgroup.add_argument('--shared-libzip',
action='store_true',
dest='shared_libzip',
default=None,
help='link to a shared libzip DLL instead of static linking')

shared_optgroup.add_argument('--shared-libuv-includes',
action='store',
dest='shared_libuv_includes',
Expand Down Expand Up @@ -2005,6 +2011,7 @@ def make_bin_override():
configure_node_lib_files(output)
configure_napi(output)
configure_library('zlib', output)
configure_library('libzip', output)
configure_library('http_parser', output)
configure_library('libuv', output)
configure_library('brotli', output, pkgname=['libbrotlidec', 'libbrotlienc'])
Expand Down
12 changes: 12 additions & 0 deletions deps/libzip/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
BasedOnStyle: LLVM
IndentWidth: 4
ColumnLimit: 2000
AlwaysBreakAfterReturnType: TopLevelDefinitions
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 2
BreakBeforeBraces: Custom
BraceWrapping:
BeforeElse: true
AlignEscapedNewlines: Left
UseTab: Never
#PPDirectiveIndentStyle: AfterHash
11 changes: 11 additions & 0 deletions deps/libzip/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
create-cmake-config.h.in.pl export-ignore
docs export-ignore
man/fix-man-links.sh export-ignore
man/make_zip_errors.sh export-ignore
man/mkdocset.pl export-ignore
man/nih-man.css export-ignore
vstudio export-ignore
developer-xcode export-ignore
32 changes: 32 additions & 0 deletions deps/libzip/.github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug Report
about: Report where libzip didn't behave like you expected.
title: ''
labels: bug
assignees: ''

---

**Describe the Bug**
A clear and concise description of what the bug is.

**Expected Behavior**
A clear and concise description of what you expected to happen.

**Observed Behavior**
A clear and concise description of what actually happened.

**To Reproduce**
Short program or code snippet that reproduces the problem.

**libzip Version**
Version of libzip or revision repository used.

**Operating System**
Operating system and version, used compiler.

**Test Files**
If applicable, attach and describe zip archives that trigger the problem.

**Additional context**
Add any other context about the problem here.
25 changes: 25 additions & 0 deletions deps/libzip/.github/ISSUE_TEMPLATE/compile-error.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Compile Error
about: Report when libzip does not compile.
title: ''
labels: compile
assignees: ''

---

**Compiler Error**
Output from the compiler, including exact and complete error message, file name and line number.

**libzip Version**
Version of libzip or revision repository used.

**Operating System and Compiler**
The operating system and compiler used, including version number.

Also, any flags passed to `cmake`.

**Autodetected Configuration**
Attach `CmakeCache.txt` from your build directory. This list everything `cmake` detected on your system.

**Additional context**
Add any other context about the problem here.
22 changes: 22 additions & 0 deletions deps/libzip/.github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature Request
about: Suggest an idea for this project.
title: ''
labels: enhancement
assignees: ''

---

**Description**
A clear and concise description of what you want to achieve, why the current features are insufficient, and why you think it is generally useful.

Also, have you checked whether the feature is already mentioned in TODO.md? If so, only submit a new issue if you expand on it.

**Solution**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context about the feature request here.
23 changes: 23 additions & 0 deletions deps/libzip/.github/workflows/CIFuzz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CIFuzz
on: [pull_request]
jobs:
Fuzzing:
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'libzip'
dry-run: false
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'libzip'
fuzz-seconds: 600
dry-run: false
- name: Upload Crash
uses: actions/upload-artifact@v1
if: failure()
with:
name: artifacts
path: ./out/artifacts
53 changes: 53 additions & 0 deletions deps/libzip/.github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: build
on: [push]

jobs:
all:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}${{ matrix.name_extra }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
cmake_extra: [""]
name_extra: [""]
include:
- os: windows-latest
cmake_extra: "-T ClangCl"
name_extra: " clang-cl"
steps:
- name: checkout
uses: actions/checkout@v2
- name: install dependencies (Linux)
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get install libzstd-dev
- name: install dependencies (Windows)
if: ${{ runner.os == 'Windows' }}
uses: lukka/run-vcpkg@v7
id: runvcpkg
with:
vcpkgGitCommitId: f93ba152d55e1d243160e690bc302ffe8638358e
vcpkgTriplet: x64-windows
vcpkgArguments: zlib bzip2 liblzma zstd
- name: prepare build directory
run: |
cmake -E make_directory ${{runner.workspace}}/build
- name: configure (Unix)
if: ${{ runner.os != 'Windows' }}
working-directory: ${{runner.workspace}}/build
run: |
cmake ${{ matrix.cmake_extra }} ${{github.workspace}}
- name: configure (Windows)
if: ${{ runner.os == 'Windows' }}
working-directory: ${{runner.workspace}}/build
run: |
cmake ${{ matrix.cmake_extra }} -DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake ${{github.workspace}}
- name: build
working-directory: ${{runner.workspace}}/build
run: |
cmake --build . --config Release
- name: test
working-directory: ${{runner.workspace}}/build
run: |
ctest -v -C Release
66 changes: 66 additions & 0 deletions deps/libzip/.github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"

on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 10 * * 4'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['cpp']
# 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@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@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

# 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@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
11 changes: 11 additions & 0 deletions deps/libzip/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/.cache
.DS_Store
/build*
/developer-xcode/libzip.xcodeproj/project.xcworkspace/xcuserdata/
/developer-xcode/libzip.xcodeproj/xcuserdata/
*~
*.tar.gz
*.tar.xz
/.clangd
/compile_commands.json
/cmake-build-debug
Loading

0 comments on commit 396157c

Please sign in to comment.