Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
82ae3b1
.gitignore: not build kernel modules
vszakats Oct 19, 2025
3492758
generate_completions.sh fixup shebang
vszakats Oct 19, 2025
e26deb2
generate_completions.sh avoid bashisms
vszakats Oct 19, 2025
e840cf0
generate_completions.sh set -eu
vszakats Oct 19, 2025
a82ad1c
generate_completions.sh fix indent
vszakats Oct 19, 2025
e09e138
cmake: initial
vszakats Oct 19, 2025
4dfcf3d
generate_completions.sh replace hardcoded output with stdout
vszakats Oct 19, 2025
b75c247
merge completions content into scripts
vszakats Oct 19, 2025
efeda76
fix compiler options
vszakats Oct 19, 2025
2830d9a
cmake: enable test targets by default
vszakats Oct 19, 2025
6b1aa17
CI tests in macOS
vszakats Oct 19, 2025
ee0480a
cleanup
vszakats Oct 19, 2025
99db705
CI: dedupe checksrc into its own job
vszakats Oct 19, 2025
a01064a
windows cont 1
vszakats Oct 19, 2025
c99e694
windows cont 2
vszakats Oct 19, 2025
684ceef
windows cont 3
vszakats Oct 19, 2025
57147c1
windows cont 4
vszakats Oct 19, 2025
0ba1dd9
windows cont 5
vszakats Oct 19, 2025
42111d1
windows cont 6
vszakats Oct 19, 2025
f757a49
cm fixup werror options
vszakats Oct 19, 2025
7c56859
windows cont 7
vszakats Oct 19, 2025
79be011
windows cont 8
vszakats Oct 19, 2025
9abf06e
trurl.c: silence MSVC CRT warnings
vszakats Oct 19, 2025
7dc54c3
CMAKE_COMPILE_WARNING_AS_ERROR does not seem to work
vszakats Oct 19, 2025
959d54e
Revert "CMAKE_COMPILE_WARNING_AS_ERROR does not seem to work"
vszakats Oct 19, 2025
0acb298
enable werror
vszakats Oct 19, 2025
31309df
trurl.c fix indent
vszakats Oct 19, 2025
f6e754c
trurl.c dedupe fallback return
vszakats Oct 19, 2025
ede2177
trurl.c fix dangling value
vszakats Oct 19, 2025
c21f1f0
Revert "trurl.c dedupe fallback return"
vszakats Oct 19, 2025
e76916f
try a different fix for double return
vszakats Oct 19, 2025
206ceb5
try fixing test.py not finding the command
vszakats Oct 19, 2025
91d661d
step names: Makefile
vszakats Oct 19, 2025
1107bdb
formatting
vszakats Oct 19, 2025
7ade4a7
CI: cmake linux
vszakats Oct 19, 2025
39e2bfe
CI: cmake cygwin
vszakats Oct 19, 2025
f78d7a9
CI: cmake cygwin 2
vszakats Oct 19, 2025
3cfd089
CI: cmake cygwin 3
vszakats Oct 19, 2025
25d518e
cm stupid error never seen before blind try 1
vszakats Oct 19, 2025
888b599
build.yml drop redundant cygwin package
vszakats Oct 19, 2025
d8f4f8b
build.yml cleanup
vszakats Oct 19, 2025
be72ec0
CI: cmake cygwin 4
vszakats Oct 19, 2025
f069a74
Revert "cm stupid error never seen before blind try 1"
vszakats Oct 19, 2025
5a3d767
CI: cmake cygwin 5 try clean
vszakats Oct 19, 2025
cbaff80
CI: cmake cygwin 6 clenaup
vszakats Oct 19, 2025
bcffd50
CI: cmake cygwin debug 1
vszakats Oct 19, 2025
11bac31
test.py: show which trurl binary is used
vszakats Oct 19, 2025
4f6818f
CI: cmake cygwin debug 2
vszakats Oct 19, 2025
fef40dd
CI: cmake cygwin criticial
vszakats Oct 19, 2025
f3a7123
CI: cmake cygwin debug 3
vszakats Oct 19, 2025
0992736
add trick to pass trurl exe name in multiconfig
vszakats Oct 19, 2025
b380e5d
solve without hacks
vszakats Oct 19, 2025
521c54c
quote
vszakats Oct 19, 2025
e757aa6
formatting
vszakats Oct 19, 2025
ed64ae6
cmake add workaround for FindCURL.cmake issue?
vszakats Oct 19, 2025
9417327
trurl.c disable punycode on Windows
vszakats Oct 19, 2025
f1ad846
drop quotes from target names (cleanup)
vszakats Oct 19, 2025
ac457dc
cmake improve docs
vszakats Oct 19, 2025
3bbd9b3
try requiring curl version
vszakats Oct 19, 2025
d6c067a
cygwin make the Makefile steps hermetic too
vszakats Oct 19, 2025
426c5d3
add cmakelint job
vszakats Oct 20, 2025
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
144 changes: 126 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,47 +48,103 @@ jobs:
with:
persist-credentials: false

- name: 'checksrc'
run: make checksrc

- name: 'make'
- name: 'Makefile make'
env:
CC: ${{ matrix.build.CC || 'cc' }}
CFLAGS: ${{ matrix.build.CFLAGS }}
LDFLAGS: ${{ matrix.build.LDFLAGS }}
run: make

- name: 'sanity test'
- name: 'Makefile sanity test'
run: ./trurl -v

- name: 'test'
- name: 'Makefile test'
if: ${{ matrix.build.test != 'test-memory' }}
env:
MATRIX_TEST_TARGET: ${{matrix.build.test}}
MATRIX_TEST_TARGET: ${{ matrix.build.test }}
run: make ${MATRIX_TEST_TARGET}

- name: 'cmake configure'
run: cmake -B bld -G Ninja -DCMAKE_INSTALL_PREFIX="$HOME"/trurl-install -DTRURL_COMPLETION_ZSH=ON -DTRURL_WERROR=ON

- name: 'cmake build'
run: cmake --build bld

- name: 'cmake install'
run: cmake --install bld

- name: 'cmake sanity test'
run: bld/trurl -v

- name: 'cmake test'
env:
MATRIX_TEST_TARGET: ${{ matrix.build.test }}
run: cmake --build bld --target trurl-"${MATRIX_TEST_TARGET}"

cygwin:
name: 'Cygwin'
runs-on: windows-2022

defaults:
run:
shell: D:\cygwin\bin\bash.exe '{0}'
env:
SHELLOPTS: 'igncr'
steps:
- uses: cygwin/cygwin-install-action@f2009323764960f80959895c7bc3bb30210afe4d # v6
with:
site: https://mirrors.kernel.org/sourceware/cygwin/
work-vol: 'D:'
packages: libcurl-devel libcurl4 make gcc-core python3
packages: gcc-core make cmake libcurl-devel python3

- uses: actions/checkout@v5
with:
persist-credentials: false

- name: 'make'
run: make
- name: 'Makefile make'
run: |
PATH=/usr/bin
make

- name: 'sanity test'
run: ./trurl -v
- name: 'Makefile sanity test'
run: |
PATH=/usr/bin
./trurl -v

- name: 'test'
run: make test
- name: 'Makefile test'
run: |
PATH=/usr/bin
make test

- name: 'cmake configure'
run: |
PATH=/usr/bin
cmake -B bld -DCMAKE_INSTALL_PREFIX="$HOME"/trurl-install -DTRURL_COMPLETION_ZSH=ON -DTRURL_WERROR=ON

- name: 'cmake build'
run: |
PATH=/usr/bin
cmake --build bld

- name: 'cmake configure log'
if: ${{ !cancelled() }}
run: |
PATH=/usr/bin
cat bld/CMakeFiles/CMake*.yaml 2>/dev/null || true

- name: 'cmake install'
run: |
PATH=/usr/bin
cmake --install bld

- name: 'cmake sanity test'
run: |
PATH=/usr/bin
bld/trurl -v

- name: 'cmake test'
run: |
PATH=/usr/bin
cmake --build bld --target trurl-test

macos:
name: 'macOS'
Expand All @@ -99,11 +155,63 @@ jobs:
with:
persist-credentials: false

- name: 'make'
- name: 'Makefile make'
run: make

- name: 'sanity test'
- name: 'Makefile sanity test'
run: ./trurl -v

- name: 'test'
- name: 'Makefile test'
run: make test

- name: 'cmake configure'
run: cmake -B bld -G Ninja -DCMAKE_INSTALL_PREFIX="$HOME"/trurl-install -DTRURL_COMPLETION_ZSH=ON -DTRURL_WERROR=ON

- name: 'cmake build'
run: cmake --build bld

- name: 'cmake install'
run: cmake --install bld

- name: 'cmake sanity test'
run: bld/trurl -v

- name: 'cmake test'
run: cmake --build bld --target trurl-test

windows:
name: 'Windows'
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false

- name: 'install prereqs'
run: |
mkdir curl
curl --disable --fail --silent --show-error --connect-timeout 15 --max-time 240 --retry 3 --retry-connrefused \
--location --proto-redir =https 'https://curl.se/windows/latest.cgi?p=win64-mingw.tar.xz' | tar --strip-components=1 -xJ --directory=curl

- name: 'cmake configure'
run: cmake -B bld -DCMAKE_BUILD_TYPE=Debug -DCURL_INCLUDE_DIR="$PWD"/curl/include -DCURL_LIBRARY="$PWD"/curl/lib/libcurl.dll.a -DTRURL_WERROR=ON

- name: 'cmake build'
run: cmake --build bld --verbose

- name: 'cmake configure log'
if: ${{ !cancelled() }}
run: cat bld/CMakeFiles/CMake*.yaml 2>/dev/null || true

- name: 'cmake sanity test'
run: |
PATH="$PWD/curl/bin:$PATH"
bld/Debug/trurl -v

- name: 'cmake test'
run: |
PATH="$PWD/curl/bin:$PATH"
cmake --build bld --target trurl-test
43 changes: 43 additions & 0 deletions .github/workflows/checksrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ concurrency:
permissions: {}

jobs:
checksrc:
name: 'checksrc'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false

- name: 'checksrc'
run: |
# shellcheck disable=SC2046
scripts/checksrc.pl $(git ls-files '*.c' '*.h')

linters:
name: 'spellcheck, linters, REUSE'
runs-on: ubuntu-latest
Expand Down Expand Up @@ -66,3 +79,33 @@ jobs:
source ~/venv/bin/activate
codespell --version
codespell README.md RELEASE-NOTES CONTRIBUTING.md trurl.1 trurl.c

- name: 'cmakelint'
run: |
source ~/venv/bin/activate
cmake-lint --version
cmake-lint \
--suppress-decorations \
--disable \
--line-width 132 \
--tab-size 2 \
--use-tabchars false \
--disabled-codes C0113 \
--function-pattern 'trurl_[0-9a-z_]+' \
--macro-pattern 'trurl_[0-9a-z_]+' \
--global-var-pattern '[A-Z][0-9A-Z_]+' \
--internal-var-pattern '_[a-z][0-9a-z_]+' \
--local-var-pattern '_[a-z][0-9a-z_]+' \
--private-var-pattern '_[0-9a-z_]+' \
--public-var-pattern '[A-Z][0-9A-Z_]+' \
--argument-var-pattern '_[a-z][0-9a-z_]+' \
--keyword-pattern '[A-Z][0-9A-Z_]+' \
--max-conditionals-custom-parser 2 \
--min-statement-spacing 1 \
--max-statement-spacing 2 \
--max-returns 6 \
--max-branches 12 \
--max-arguments 5 \
--max-localvars 15 \
--max-statements 50 \
CMakeLists.txt
1 change: 1 addition & 0 deletions .github/workflows/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Copyright (C) Viktor Szakats. See LICENSE.md
# SPDX-License-Identifier: curl

cmakelang==0.6.13
codespell==2.4.1
reuse==6.1.2
9 changes: 0 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,6 @@ _trurl.zsh
*.idb
*.pdb

# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf

# Output files from msvc
winbuild/bin/
winbuild/obj/
Expand Down
Loading