Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
401 commits
Select commit Hold shift + click to select a range
1713d1d
eval: Reset input for pipelines
herbertx Jul 24, 2024
9e8cb45
jobs: Add comment about reset_input in forkchild
herbertx Jul 24, 2024
60eeccd
builtin: Align test -nt and -ot with POSIX.1-2024
nabijaczleweli Jul 28, 2024
5627b5b
histedit: Use EL_PROMPT_ESC
chimps-ahoy Aug 23, 2024
da680db
builtin: Keep backslash on undefined escape sequences
herbertx Oct 21, 2024
b3e38ad
man: Clarify the `trap` condition `EXIT`
calestyo Oct 23, 2024
73e4242
builtin: Reduce size of conv_escape
herbertx Nov 16, 2024
a76c0f4
expand: Fix scanleft/right for !FNMATCH_IS_ENABLED && quotes
herbertx Nov 17, 2024
db54e02
builtin: fix timescmd with C23
thesamesam Nov 17, 2024
c1968b0
expand: Fix scanright zero handling when fnmatch is disabled
herbertx Mar 9, 2025
20549a1
expand: Add bypass for literal "]" in expandmeta
herbertx Mar 9, 2025
fd725b7
expand: Fix buffer overread caused by passing array of chars as strin…
BalkanMadman Apr 29, 2025
e878137
expand: Move stop array closer to strpbrk call
herbertx May 3, 2025
b4ef25d
input: Reset eof in reset_input
herbertx May 28, 2025
0cc3211
jobs: avoid blocking signals on vfork
hvdijk Aug 22, 2025
da72f69
shell: Add VxWorks support
kuhlenough May 28, 2025
4e32f89
options: Simplify procargs
dvlasenk Aug 3, 2025
6abb589
input: Call input_init on first use
herbertx Aug 24, 2025
d609f6c
jobs: Cache getpid
herbertx Aug 24, 2025
2ef2074
parser: Do not display prompts in expandstr
herbertx Aug 27, 2025
92ff9ac
builtin: Fix argv overrun in aexpr and oexpr
herbertx Aug 28, 2025
98cc11a
expand: Do not call rmescapes in expari
herbertx Aug 28, 2025
64507de
parser: Skip parsing of old-style command substitution here-doc marker
herbertx Sep 13, 2025
4595bd6
expand: Check for NUL before parsing range expression in pmatch
herbertx Sep 13, 2025
694f47f
parser: Fix USTPUTC overflow for new-style command substition here-do…
herbertx Sep 13, 2025
ca41801
expand: Do not use memcmp on strings
herbertx Sep 14, 2025
a8d4986
mystring: Ignore ERANGE errors in atomax
herbertx Sep 14, 2025
6925b23
options: Check stderr instead of stdout for interactivity
herbertx Sep 14, 2025
1365bb3
Release 0.5.13.
herbertx Sep 21, 2025
6dcc007
expand: Fix typo in pmatch for wildcard search
herbertx Sep 23, 2025
85ae9ea
expand: Fix off-by-one bug in expmeta
herbertx Sep 28, 2025
2237766
builtin: Keep backslash on quotes outside of dollarsq
herbertx Oct 6, 2025
a768fcc
Release 0.5.13.1.
herbertx Oct 13, 2025
5139d6a
shell: Fix unsigned char promotion and truncation
herbertx Oct 21, 2025
74adb5a
options: Call input_init before using stdin_istty
herbertx Oct 31, 2025
d22fb97
expand: Fix SIGBUS due to unaligned access
ncopa Jan 16, 2026
67dbc1e
shell: Add support for building without tee(2)
herbertx Jan 28, 2026
c7f7893
shell: Add support for disabling memfd_create(3)
herbertx Feb 3, 2026
8347bea
jobs: Fix here-document crash
herbertx Feb 3, 2026
079059a
input: Fix heap-buffer-overflow in preadbuffer on long lines
marmitar Feb 12, 2026
e8c0324
parser: Catch bogus case patterns
herbertx Mar 15, 2026
53845fd
builtin: Fix read overflow in umaskcmd
herbertx Mar 15, 2026
57ed270
expand: Use memmove when copying multi-byte chars in rmescapes
herbertx Mar 15, 2026
d029fb8
jobs: Make stoppedjobs trivial if JOBS == 0
herbertx Mar 16, 2026
b308564
Release 0.5.13.2.
herbertx Mar 21, 2026
8341dbd
parser: Only reject non-word tokens in case pattern
herbertx Apr 12, 2026
0034bfe
arith: Fix CVE-2026-31323 INTMAX_MIN / -1 overflow
ze-mu-zhou Apr 13, 2026
41457be
input: Fix EINTR handling when reading from a pipe
herbertx Apr 13, 2026
601bc50
Release 0.5.13.3.
herbertx Apr 18, 2026
e8c6952
another todo note about backticks
mgree Dec 12, 2017
8b6da2a
expose hooks
mgree Sep 26, 2018
48f5b8d
parser command with builtin exception handler
mgree Sep 26, 2018
5d87991
fix POSIX compliance bug, per bug report of 2017-01-19
mgree Sep 26, 2018
ae0450f
missing #ifdef
mgree Sep 26, 2018
2334210
update gitignore
mgree Sep 26, 2018
d496719
readme
mgree Sep 26, 2018
f8e8ee3
starting in on CLI
mgree May 5, 2017
b3beb7c
first cut on command-line tool
mgree May 8, 2017
b7568c0
tiny fixes to makefiles, works with latest ctypes
mgree May 8, 2017
1ddf3ed
add tildes to ast parsing
mgree Jun 21, 2017
2950595
fix VSNUL reading bug, manage todos, tiny fix in expansion
mgree Jun 23, 2017
9415d0f
working on using setjmp to setup an error handler for dash, but no lu…
mgree Sep 15, 2017
c23cb88
remove handler call
mgree Sep 15, 2017
0915e99
fix Makefiles to not look in global spots---just use opam
mgree Jan 26, 2018
ed452e3
fix case statements to allow for | in patterns
mgree Aug 13, 2018
a9fb6ac
basic env initialization, lots more working
mgree Aug 20, 2018
5250271
implemented eval
mgree Sep 5, 2018
6e63eaa
implement source/., add eval tests, fix how exit works
mgree Sep 5, 2018
2602ddf
fix handling of PS1 and PS2
mgree Sep 25, 2018
8a6f520
knock off TODOs in web interface, cleaner error handling
mgree Sep 25, 2018
b1d5d24
support aliases
mgree Sep 25, 2018
53cec04
move ocaml bindings to a separate directory
mgree Sep 26, 2018
38d03df
building static library and executable
mgree Sep 26, 2018
9c61c4e
clean build of everything
mgree Sep 26, 2018
b8b1123
update readme
mgree Sep 26, 2018
cdc7aa6
change build to keep libdash in working directory. gross, but avoids …
mgree Sep 26, 2018
eb41a89
fix build deps and clean target
mgree Sep 26, 2018
475e248
working on getting shared libraries built
mgree Sep 27, 2018
9b54b00
correctly building in both docker and my computer
mgree Sep 27, 2018
0a103aa
break out tests, building properly as a library and installing correctly
mgree Sep 28, 2018
00ea42c
fixup gitignores
mgree Sep 28, 2018
36e914f
better builds on OS X: same script works on docker
mgree Sep 28, 2018
f34f478
cleanup escaping
mgree Oct 5, 2018
015a176
better fix
mgree Oct 5, 2018
e3fe597
add missing makefile
mgree Oct 9, 2018
d08fcf9
properly handle null commands---which can show up in an empty case, n…
mgree Oct 23, 2018
c08bc75
setting up CI
mgree Nov 15, 2018
204b27d
more careful stack discipline
mgree Nov 15, 2018
28cc465
add Travis badge [ci skip]
mgree Nov 15, 2018
69e5fd6
update instructions [ci skip]
mgree Nov 15, 2018
bf62307
trim up unnecessary/broken setjmp. prevent the ocaml GC from seeing t…
mgree Nov 16, 2018
fa64fab
add test with comments; not actually a problem, but might as well kee…
mgree Dec 7, 2018
ab91d59
marked in alias
mgree Dec 7, 2018
7569873
more in alias
mgree Dec 7, 2018
3d4f912
more marking
mgree Dec 7, 2018
071a5b9
cleaner diffs
mgree Dec 7, 2018
fe53ebe
still cleaner
mgree Dec 7, 2018
1f3b596
expose a function for getting fresh fds >= 10
mgree Dec 12, 2018
19f8960
better interface for freshfd_ge10, so i can nab EBADF
mgree Dec 14, 2018
5dc2a0b
fix to errno when running on glibc, make fcntl code simpler
mgree Dec 19, 2018
8be27f5
build .so file to support bytecode compilation (needed for profiling)
mgree Dec 20, 2018
c010021
add debug info, tests passing
mgree Dec 20, 2018
7a97660
fix bug in tildes in arithmetic mode
mgree Jan 3, 2019
3c24161
remove call to reset() that was breaking parse error handling
mgree Apr 24, 2019
5a41da9
fix handling of empty aliases
mgree Apr 25, 2019
bd68b02
fix ocaml version at 4.07
mgree Jun 24, 2019
92d2961
fix redir parsing
mgree Jul 8, 2019
e308612
fix spacing [ci skip]
mgree Jul 8, 2019
d12e01a
add back in logic for closed fds
mgree Jul 8, 2019
8d128ac
Remove the root stackmark.
tucak Jan 24, 2020
ab51585
pushing on tests after tiny fix---ast.ml is out of sync :(
mgree Jan 31, 2020
4897bfd
another broken test
mgree Jan 31, 2020
cc18fa2
basic opam file working
mgree Jan 31, 2020
f3efe52
add url info
mgree Jan 31, 2020
f97b53a
rpath to find installed libdash files seems to be working
mgree Feb 17, 2020
6987b66
working on opam file
mgree Feb 3, 2020
b0c4524
flailing
mgree Feb 3, 2020
3cdd872
more flailing
mgree Feb 3, 2020
fdc1dbe
everything builds, LD_LIBRARY_PATH issues remain
mgree Feb 5, 2020
66bf1b0
META is generated
mgree Feb 6, 2020
3d5df38
use _:lib to avoid permission problem (???)
mgree Feb 7, 2020
4cb3a10
revert
mgree Feb 7, 2020
8aa50f8
pushing
mgree Feb 17, 2020
d1b7efe
actually working, for real
mgree Feb 17, 2020
83777d4
minimal linker options
mgree Feb 17, 2020
103299e
remove need for explicit TMPDIR on macOS
mgree Feb 18, 2020
3cec3fa
fixup unset or null
mgree Feb 18, 2020
ffcce12
fix install ordering, everything works!!!!!!
mgree Feb 18, 2020
ebbc615
add str dep to build
mgree Feb 19, 2020
a94c239
bump to 0.2
mgree Feb 19, 2020
c8cb828
add checksum of new release
mgree Feb 19, 2020
accff6b
update OPAM file to use the right local libtoolize
mgree Feb 19, 2020
b96136c
version bump, add str dependency in test
mgree Feb 19, 2020
24789e8
add back checksum (this is ridiculous)
mgree Feb 19, 2020
13eaf25
building into custom directory... not _quite_ there
mgree Feb 20, 2020
65a0d64
tests don't QUITE work
mgree Feb 20, 2020
6094e5c
staged builds working with all tests passing
mgree Feb 20, 2020
229d425
add URL to OPAM file
mgree Feb 20, 2020
5e14938
fix up makefiles for OPAM CI
mgree Feb 20, 2020
0826edc
really forcing that library path home
mgree Feb 20, 2020
7af35f7
trying to manually do ldconfig's work
mgree Feb 20, 2020
d7d233d
debugging, setting checksum
mgree Feb 20, 2020
73e8c76
debugging
mgree Feb 20, 2020
c9316cc
i am in linking hell
mgree Feb 20, 2020
edbfb81
revert to 0.1 tag, remove debugging
mgree Feb 20, 2020
775967b
update link, add checksum
mgree Feb 20, 2020
ba2b397
fix checksum
mgree Feb 20, 2020
e4cafe6
drop checksum from repo (self-reference issues)
mgree Feb 20, 2020
f9661bd
update OPAM script
mgree Feb 25, 2020
712db39
revised attempt at integrated tests
mgree Feb 25, 2020
fb651f5
go back to libdash.install approach
mgree Feb 25, 2020
26ff032
v0.1.1, porting a bugfix @tucak from mgree/smoosh#18
mgree May 12, 2020
658fa24
better output from failed tests, to debug bad build in CI
mgree May 12, 2020
011a6a5
add conf-libtool dep, now that OPAM repo is up to date
mgree May 12, 2020
d6d3735
set missing variables in .travis.yml
mgree May 12, 2020
c3942cb
lol no osx for u
mgree May 12, 2020
1837156
local debugging of the opam-repo issues, using direct VM and no docke…
mgree May 12, 2020
80ee363
you have to use the right script name
mgree May 12, 2020
6af30bc
affirmative
mgree May 12, 2020
48b6f17
verbose build, turn off post-install tests (which now happen directly…
mgree May 12, 2020
2b62f4e
seeing if explicit LD_LIBRARY_PATH does it...
mgree May 12, 2020
b564ff9
fix caching
mgree May 12, 2020
a8898d1
getting some ldd feedback...
mgree May 12, 2020
79bd319
more debugging, le sigh
mgree May 12, 2020
9053672
trying to build in more...
mgree May 12, 2020
77c11db
trying fancier linkopts...
mgree May 12, 2020
804f5db
just put more options in there
mgree May 12, 2020
0001c60
no linkpkg. we're just shooting in the dark at this point, ugh
mgree May 12, 2020
209579b
copy over matrix from opam-repository, for verisimilitude
mgree May 13, 2020
f884378
fix macos deps
mgree May 13, 2020
3cdfdaf
missing -dev on autotools, blargh
mgree May 13, 2020
973a867
use addons, this is getting ridiculous
mgree May 13, 2020
4b0b669
drop LD_LIBRARY_PATH, probably breaking everything :(
mgree May 13, 2020
f82dead
adding conf-aclocal (fix alpine... maybe freebsd, too?)
mgree May 13, 2020
dc9cce3
fix splat bang in tests
mgree May 13, 2020
2d67558
add str dependency
mgree May 14, 2020
80e8712
debug info on META, trying to clarify rpath... huh.
mgree May 14, 2020
8fd128b
try to fix mk_meta
mgree May 14, 2020
1d538d7
fix mk_meta
mgree May 14, 2020
315c0ba
update ci
mgree Sep 25, 2020
d95665a
added AST guide from pash convo
mgree Dec 23, 2020
9b725c0
support thread business in ctypes-foreign
mgree May 13, 2021
d39e131
setup gh workflow
mgree May 13, 2021
50f2244
s/mgt/libdash/ copypasta lol whoops
mgree May 13, 2021
a0fd780
drop windows build---hopeless
mgree May 13, 2021
ff100c6
drop -thread for ocamlmklib
mgree May 13, 2021
38d9964
thread support in tests
mgree May 13, 2021
0d8f4d7
move to gh actions
mgree May 13, 2021
be51634
Use setup-ocaml v2 (#14)
smorimoto Feb 25, 2022
2d58042
Python bindings (#17)
mgree Jul 10, 2022
787ba84
Add Python package support (#18)
mgree Jul 27, 2022
d294791
Fix refs in deploy stage
mgree Jul 27, 2022
b2b2994
alas macos-10.15, we hardly knew ye
mgree Jul 27, 2022
d294113
readme touchup, remove unncessary call to version.sh
mgree Jul 27, 2022
3ceae06
no need for macos-12 either, builds fr 10.9
mgree Jul 27, 2022
77ac090
correct version number in setup.py
mgree Jul 27, 2022
c9967cf
include pyproject.toml
mgree Jul 27, 2022
a9a09e8
Hardcode version and add checking in version.sh
mgree Jul 27, 2022
1a46d4a
fix src url for opam
mgree Jul 27, 2022
099ae05
fix python deployment
mgree Jul 27, 2022
993d01c
correct deploy tag arggggh
mgree Jul 27, 2022
e048688
drop skip_existing now that we have the green light
mgree Jul 27, 2022
ea67372
force runtime computation of library path
mgree Jul 27, 2022
83d2d77
force 0.3 release
mgree Jul 27, 2022
e587a86
Add build canary (#19)
mgree Jul 28, 2022
8910361
opam fixup, with thanks to kit-ty-kate
mgree Jul 28, 2022
eca15db
run ocaml tests to completion on macos; add missing double dashes
mgree Jul 29, 2022
94bd056
add conf-automake to be explicit, run opam depext in canary as workar…
mgree Aug 1, 2022
8e35bba
be explicit about whose depexts
mgree Aug 1, 2022
a7b1ccf
run canary on ubuntu 18.04, too
mgree Aug 1, 2022
eb19acb
specify ubuntu versions for python, too
mgree Aug 1, 2022
6494689
python minimum version -> 3.6
mgree Aug 18, 2022
e8952c2
bump version to patch 0.3.1
mgree Aug 18, 2022
e1cd090
lower setuptools to accommodate 3.6
mgree Aug 18, 2022
344f27a
don't run canary on push
mgree Aug 18, 2022
667146c
fix version.sh
mgree Aug 18, 2022
10494d7
j/k keep it at 3.7
mgree Aug 18, 2022
809169c
pretty printing documentation [ci skip]
mgree Aug 18, 2022
2510eb6
Quoting fixes (#20)
mgree Aug 23, 2022
41f4faf
readme note, bump version
mgree Aug 23, 2022
64e2390
Fix macOS build (#23)
mgree Nov 7, 2022
1277fd2
update checkout
mgree Nov 28, 2023
4e24100
Static `ctypes`; building with `dune` (#28)
mgree Dec 19, 2023
0b3814a
Rename libdash library to avoid name collision in dune (#29)
mgree Feb 4, 2024
4bc0794
Quote dollar signs when not by themself (#31)
BolunThompson Dec 9, 2024
21d8a6b
Correctly print subshells nested in a variable expansion (#32)
BolunThompson Jan 3, 2025
87018ad
update workflows
mgree Jan 23, 2025
eca3f2f
use setup-ocaml@v3
mgree Jan 27, 2025
53bbfa8
use macos-latest
mgree Jan 27, 2025
46b5db8
trying to rebuild wheels and release
mgree Apr 28, 2026
ab19a6a
trying to fix atdgen dep
mgree Apr 28, 2026
71da41b
cleanup
mgree Apr 29, 2026
3ebc27a
only build on push for main, not other branhes
mgree Apr 29, 2026
aecb569
ci not building
mgree Apr 29, 2026
f6b2c66
s/main/master/
mgree Apr 29, 2026
cfa39fb
run on all pushes, since we cannot form a merge commit
mgree Apr 29, 2026
dd7dacd
reconcile with upstream
mgree Apr 29, 2026
984ed80
relax assertion
mgree May 8, 2026
b1e3d09
update pyproject.toml, try using venv
mgree May 21, 2026
bc7b090
fix license-files, update checkout action
mgree May 21, 2026
0fc7b6c
try to fix license-files
mgree May 21, 2026
c770bee
try updating cibuildwheel
mgree May 21, 2026
b6fa675
try updating setuptools version
mgree May 21, 2026
7a12a53
go back to the old, deprecated format
mgree May 21, 2026
632c3a9
reasonable setuptools version
mgree May 21, 2026
a7c8ccf
try setting architecture correctly in setup.py
mgree May 21, 2026
01b1a50
whoops
mgree May 21, 2026
e88a67a
try skipping delocation
mgree May 21, 2026
62c8e6a
debug CI host setup
mgree May 21, 2026
e3afbf2
fix os.environ direct index
mgree May 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
85 changes: 85 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# compiled code anywhere
**/*.native
**/*.byte
**/*.o
**/*.lo
**/*.cmx
**/*.cmo
**/*.cmi
**/*.a
**/*.cmxa
**/*.dSYM/
**/_build

# system crap
Dockerfile
Dockerfile.test
Dockerfile.web
.git
.gitmodules
.dockerignore
**/.gitignore
**/*~
**/.#*
**/.DS_Store
**/.DS_Store?
**/._*
**/.Spotlight*
**/.Trash*
**/*[Tt]humbs.db
**/*~
**/*.bak
**/*.orig
**/*.rej

################################################################################
# libdash ignores

libtool
# geneated by libtool
ltmain.sh

# generated by autogen.sh
Makefile.in
aclocal.m4
autom4te.cache/
compile
config.h.in
configure
depcomp
install-sh
missing

# generated by configure
Makefile
config.cache
config.h
config.log
config.status
src/.deps/
stamp-h1

# generated by make
src/token_vars.h

# generated files
ar-lib
config.*
src/libdash.a

src/builtins.[ch]
src/builtins.def
src/dash
src/init.c
src/mkinit
src/mknodes
src/mksignames
src/mksyntax
src/nodes.[ch]
src/signames.c
src/syntax.[ch]
src/token.h

src/.libs
src/.deps

155 changes: 155 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
name: Main workflow

on:
pull_request:
branches:
- master
push:
schedule:
- cron: '5 14 * * *'

jobs:
check-version-numbers:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Check version numbers
run: ./version.sh

package-python:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest

runs-on: ${{ matrix.os }}

steps:
- name: Install dependencies (libtool, aclocal, autoconf)
run: |
if [ "$RUNNER_OS" = "Linux" ]; then
sudo apt-get install libtool automake
elif [ "$RUNNER_OS" = "macOS" ]; then
brew install libtool autoconf automake
else
echo Unsupported RUNNER_OS=$RUNNER_OS
exit 1
fi

- name: Checkout code
uses: actions/checkout@v6

- name: Build wheels
uses: pypa/cibuildwheel@v3.4.1
env:
CIBW_REPAIR_WHEEL_COMMAND_MACOS: ""

- name: Upload binary wheel
uses: actions/upload-artifact@v4
with:
name: ${{ format('bdist.{0}', matrix.os) }}
path: wheelhouse/libdash-*.whl

- name: Build source distribution (Linux only)
if: contains(matrix.os, 'ubuntu')
run: python setup.py sdist

- name: Upload source distribution (from Linux)
uses: actions/upload-artifact@v4
if: contains(matrix.os, 'ubuntu')
with:
name: sdist
path: dist/libdash-*.tar.gz

build-both-and-compare:
strategy:
fail-fast: true
matrix:
os:
- macos-latest
- ubuntu-latest
ocaml-compiler:
- 4.14.x

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: avsm/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: true

- name: Install and test OCaml bindings
run: opam install --with-test --working-dir .

# we don't reuse the wheels so that all of the CI runs can happen concurrently
- name: Install Python via venv
run: |
python3 -m venv .venv
. .venv/bin/activate
python3 -m pip install .

- name: Test Python bindings
run: |
. .venv/bin/activate
make -C python test

- name: Compare OCaml and Python bindings
run: |
. .venv/bin/activate
opam exec -- make -C test test

deploy:
needs:
- check-version-numbers
- package-python
- build-both-and-compare
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')

steps:
- name: Download distributions
uses: actions/download-artifact@v4

- name: Rename distributions
run: |
mkdir dist
ls bdist.*/
mv bdist.*/libdash-*.whl dist/
mv sdist/libdash-*.tar.gz dist/
echo Look on my Works, ye Mighty, and despair!
ls dist

- name: Deploy 'latest' release on GH
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Python source and binary distributions"
files: |
dist/*

- name: Deploy test distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
verbose: true
repository_url: https://test.pypi.org/legacy/
skip_existing: true

- name: Deploy tagged release on PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true
71 changes: 71 additions & 0 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Distribution canary

on:
# push:
schedule:
- cron: '20 13 * * *'

jobs:
ocaml:
strategy:
fail-fast: false
matrix:
os:
- macos-14
- macos-15
- ubuntu-22.04
- ubuntu-24.04
ocaml-compiler:
- 4.14.x
- 5.2.x

runs-on: ${{ matrix.os }}

steps:
- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: avsm/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}

- name: Install OCaml bindings from OPAM
run: |
opam update
opam depext libdash
opam install libdash

- name: Test OPAM executables
run: test "$(echo hi | opam exec -- shell_to_json | opam exec -- json_to_shell)" = "hi"

python:
strategy:
fail-fast: true
matrix:
os:
- macos-12
- macos-11
- ubuntu-18.04
- ubuntu-20.04
python-version:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
repository_url:
- https://pypi.org/simple/
- https://test.pypi.org/simple/

runs-on: ${{ matrix.os }}

steps:
- name: Use Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install Python bindings from ${{ matrix.repository_url }}
run: pip install -v -i "${{ matrix.repository_url }}" --extra-index-url https://pypi.org/simple/ libdash

- name: Test Python library
run: |
RT="$(printf 'import libdash\nasts = libdash.parse("-", True)\nfor (ast, lines, linno_before, linno_after) in asts:\n print(libdash.to_string(ast))\n')"
test "$(echo hi | python -c "$RT")" = "hi"
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,15 @@ Makefile
/stamp-h1

# generated by make
/src/builtins.h
/src/nodes.h
/src/syntax.h
/src/token.h
/src/token_vars.h

# generated by dune
_build

# Apple debug symbol bundles
*.dSYM/

Expand All @@ -37,6 +44,20 @@ Makefile
.DS_Store
.DS_Store?
._*
.\#*
.Spotlight*
.Trash*
*[Tt]humbs.db
ar-lib
config.*
src/libdash.a
*.lo
*.dylib
m4
libtool
ltmain.sh
ocamlprof.dump
__pycache__
libdash.egg-info
dist
build
Loading
Loading