Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
# Build Python sdist and wheel.
name: build_wheels
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
push:
release:
types: [published]
# Allow trigger via API
workflow_dispatch:
permissions: read-all
permissions:
contents: read
jobs:
build_sdist:
name: Build sdist
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Install build dependencies
run: |
sudo apt update
Expand All @@ -28,8 +35,11 @@ jobs:
build_wheel:
name: Build wheel
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Install build dependencies
run: |
sudo apt update
Expand All @@ -44,6 +54,7 @@ jobs:
upload_test_pypi:
needs: [build_sdist, build_wheel]
runs-on: ubuntu-latest
timeout-minutes: 60
environment: pypi
permissions:
id-token: write
Expand All @@ -60,6 +71,7 @@ jobs:
upload_pypi:
needs: [upload_test_pypi]
runs-on: ubuntu-latest
timeout-minutes: 60
environment: pypi
permissions:
id-token: write
Expand Down
28 changes: 23 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
# Check source.
name: lint
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
branches:
- main
push:
branches:
- main
permissions: read-all
permissions:
contents: read
jobs:
black:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Check format of Python code
uses: psf/black@stable
with:
options: "--check"
src: "."
pylint:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
python-version: ['3.14']
container:
image: ubuntu:26.04
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up container
env:
DEBIAN_FRONTEND: noninteractive
Expand All @@ -49,3 +55,15 @@ jobs:
LANG: en_US.UTF-8
run: |
tox -e pylint
typos:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Install rumdl
run: cargo install --locked typos-cli
- name: Check for typos
run: |
typos
15 changes: 13 additions & 2 deletions .github/workflows/test_docker.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
# Run tests on Fedora and Ubuntu Docker images using GIFT COPR and GIFT PPA on commit
name: test_docker
on: [push]
permissions: read-all
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
permissions:
contents: read
jobs:
test_fedora:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
version: ['44']
container:
image: registry.fedoraproject.org/fedora:${{ matrix.version }}
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up container
run: |
dnf install -y dnf-plugins-core langpacks-en
Expand All @@ -35,13 +43,16 @@ jobs:
python3 -m build --no-isolation --wheel
test_ubuntu:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
version: ['26.04']
container:
image: ubuntu:${{ matrix.version }}
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up container
env:
DEBIAN_FRONTEND: noninteractive
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/test_macos.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# Run tests on Mac OS.
name: test_macos
on: [push, pull_request]
permissions: read-all
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
push:
permissions:
contents: read
jobs:
test_macos:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
matrix:
include:
Expand All @@ -13,6 +20,8 @@ jobs:
toxenv: 'py314'
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Install dependencies
run: |
brew update -q
Expand Down
20 changes: 15 additions & 5 deletions .github/workflows/test_tox.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Run tox tests on Ubuntu Docker images using the deadsnakes and GIFT PPAs
name: test_tox
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
branches:
- main
push:
branches:
- main
permissions: read-all
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
include:
Expand All @@ -20,10 +21,14 @@ jobs:
toxenv: 'py313'
- python-version: '3.14'
toxenv: 'py314'
- python-version: '3.15'
toxenv: 'py315'
container:
image: ubuntu:26.04
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up container
env:
DEBIAN_FRONTEND: noninteractive
Expand All @@ -43,18 +48,22 @@ jobs:
apt install -y build-essential git pkg-config python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-pip python3-setuptools tox
- name: Run tests
env:
CPATH: /usr/include/python${{ matrix.python-version }}
LANG: en_US.UTF-8
run: |
tox -e ${{ matrix.toxenv }},wheel
coverage:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
python-version: ['3.14']
container:
image: ubuntu:26.04
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up container
env:
DEBIAN_FRONTEND: noninteractive
Expand All @@ -74,6 +83,7 @@ jobs:
apt install -y build-essential curl git pkg-config python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-pip python3-setuptools tox
- name: Run tests with coverage
env:
CPATH: /usr/include/python${{ matrix.python-version }}
LANG: en_US.UTF-8
run: |
tox -e coverage
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/test_windows.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# Run tests on Windows.
name: test_windows
on: [push, pull_request]
permissions: read-all
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
push:
permissions:
contents: read
jobs:
test_windows:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
matrix:
include:
Expand All @@ -15,15 +22,20 @@ jobs:
- name: Configure git
run: git config --global core.autocrlf false
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'tox.ini'
- name: Install tox
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Run tests
env:
PIP_CACHE_DIR: ~\AppData\Local\pip\Cache
run: |
tox -e ${{ matrix.toxenv }}
35 changes: 35 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[files]
extend-exclude = [
"test_data/"
]

[default]
binary = false
check-filename = true
check-file = true
unicode = true
locale = "en-us"
extend-ignore-re = [
# Ignore a line that is preceded with `# typos:ignore`
"(#|//)\\s*typos:ignore\\n.*",

# Ignore code blocks between `# typos:disable` and `# typos:enable`
"(?s)(#|//)\\s*typos:disable.*?\\n\\s*(#|//)\\s*typos:enable",

# Ignore text between <!-- typos:disable --> and <!-- typos:enable -->
"(?s)<!--\\s*typos:disable\\s*-->.*?<!--\\s*typos:enable\\s*-->",

# Ignore 'rpmbuild_flags="-ba"'
'rpmbuild_flags="-ba"',

# Ignore "Ned Batchelder"
"\\bNed Batchelder\\b",

# Ignore "Yann Collet"
"\\bYann Collet\\b",
]
extend-words = {
"astroid" = "astroid",
"certifi" = "certifi",
"flor" = "flor",
}
4 changes: 2 additions & 2 deletions config/docker/build_dpkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ then
# Run the container in interactive mode ("run -it") to use gpg-agent to sign the builds
docker run \
-it \
-u ${UID}:${GID} \
-u "${UID}:${GID}" \
-v "${GNUPG_DIRECTORY}:/home/ubuntu/.gnupg:z" \
-v "${L2TBUILDS_DIRECTORY}:/home/ubuntu/l2tbuilds:z" \
log2timeline/l2tbuilds_ubuntu
else
docker run \
-u ${UID}:${GID} \
-u "${UID}:${GID}" \
-v "${L2TBUILDS_DIRECTORY}:/home/ubuntu/l2tbuilds:z" \
log2timeline/l2tbuilds_ubuntu \
/bin/bash -c "(cd l2tdevtools && ./utils/build_dpkg.sh --preset plaso)"
Expand Down
2 changes: 1 addition & 1 deletion data/licenses/LICENSE.certifi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This packge contains a modified version of ca-bundle.crt:
This package contains a modified version of ca-bundle.crt:

ca-bundle.crt -- Bundle of CA Root Certificates

Expand Down
4 changes: 4 additions & 0 deletions data/templates/gift_copr_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,20 @@ ${debug_dependencies}

sudo dnf install -q dnf-plugins-core
sudo dnf copr -q -y enable @gift/dev
# shellcheck disable=SC2086
sudo dnf install -q -y $${PYTHON3_DEPENDENCIES}

if [[ "$$*" =~ "include-debug" ]]; then
# shellcheck disable=SC2086
sudo dnf install -q -y $${DEBUG_DEPENDENCIES}
fi

if [[ "$$*" =~ "include-development" ]]; then
# shellcheck disable=SC2086
sudo dnf install -q -y $${DEVELOPMENT_DEPENDENCIES}
fi

if [[ "$$*" =~ "include-test" ]]; then
# shellcheck disable=SC2086
sudo dnf install -q -y $${TEST_DEPENDENCIES}
fi
Loading
Loading