Skip to content

Commit

Permalink
Deploy to GitHub pages
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 4, 2024
0 parents commit 5688da6
Show file tree
Hide file tree
Showing 260 changed files with 15,269 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: 2

jobs:
build:
docker:
- image: cimg/base:2021.11
steps:
- checkout
- run:
name: Install compilers
command: ./.circleci/run.sh install-deps
- run:
name: Build and test (dmd)
command: ./.circleci/run.sh build-dmd
- run:
name: Build and test (ldc)
command: ./.circleci/run.sh build-ldc
#- store_artifacts:
#path: ./artifacts

workflows:
version: 2
build_and_test:
jobs:
- build:
filters:
branches:
ignore:
- /appveyor-.*/
- /travis-.*/
- gh-pages
- /dustmite-.*/
- /github-.*/
105 changes: 105 additions & 0 deletions .circleci/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
#!/bin/bash

set -uexo pipefail

#DMD_VERSION="2.098.0"
#LDC_VERSION="1.28.0"
CURL_USER_AGENT="CirleCI $(curl --version | head -n 1)"

update_repos() {
sudo apt-get update
}

install_deps() {
sudo apt-get install g++-multilib

# required for: "core.time.TimeException@std/datetime/timezone.d(2073): Directory /usr/share/zoneinfo/ does not exist."
#sudo apt-get install --reinstall tzdata gdb
}

download_install_script() {
for i in {0..4}; do
if curl -fsS -A "$CURL_USER_AGENT" --max-time 5 https://dlang.org/install.sh -O ||
curl -fsS -A "$CURL_USER_AGENT" --max-time 5 https://nightlies.dlang.org/install.sh -O ; then
break
elif [[ "$i" -ge 4 ]]; then
sleep $((1 << i))
else
echo 'Failed to download install script' 1>&2
exit 1
fi
done
}

install_and_activate_compiler() {
local compiler compiler_version_ext compiler_build

compiler=$1
[[ $# -gt 1 ]] && compiler_version_ext="-$2" || compiler_version_ext=""
compiler_build="${compiler}${compiler_version_ext}"

source "$(CURL_USER_AGENT=\"$CURL_USER_AGENT\" bash install.sh $compiler_build --activate)"
}

use_lu_master() {
if [[ ! -d lu ]]; then
git clone https://github.com/zorael/lu.git
dub add-local lu
fi
}

build() {
local compiler_switch arch_switch

compiler_switch="--compiler=$1"
arch_switch="--arch=$2"

shift 2 # shift away compiler and arch
# "$@" is now any extra parameters passed to build

dub clean

time dub test $compiler_switch $arch_switch "$@"
time dub build $compiler_switch $arch_switch "$@" --nodeps -b debug
time dub build $compiler_switch $arch_switch "$@" --nodeps -b plain
time dub build $compiler_switch $arch_switch "$@" --nodeps -b release
}

# execution start

case $1 in
install-deps)
update_repos
install_deps
download_install_script
;;

build-dmd)
install_and_activate_compiler dmd #"$DMD_VERSION"
dmd --version
dub --version

#use_lu_master

#time build dmd x86 # no 32-bit libs?
time build dmd x86_64
;;

build-ldc)
install_and_activate_compiler ldc #"$LDC_VERSION"
ldc2 --version
dub --version

#use_lu_master

#time build ldc2 x86 # no 32-bit libs?
time build ldc2 x86_64
;;

*)
echo "Unknown command: $1";
exit 1;
;;
esac

exit 0
35 changes: 35 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>index (index)</title>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<link href="style.css" rel="stylesheet" />
<script src="script.js" type="text/javascript"></script>


<link href="search-results.html" rel="prefetch" />
</head>
<body>
<div id="page-header">
<div id="logotype">
<span>lu</span>
<nav>
<a href="http://dlang.org/">Dlang.org</a>
</nav>
</div>

<form action="search-docs.html" id="search">
<input name="searchTerm" placeholder="Find a symbol name..." type="search" />
<input type="submit" value="Go" />
</form>
</div>
<div id="page-body">
<div id="page-content">
<h1>index</h1><div class="breadcrumbs"></div><div><div class="documentation-comment synopsis"><div></div></div></div><div class="annotated-prototype"></div><h2 id="modules"><a class="header-anchor" href="#modules">Modules</a></h2><dl class="member-list native"><dt><a href="lu.html">lu</a><div class="simplified-prototype" style="max-width: 9ch;"><span class="builtin-type">module</span> <span class="name">lu</span></div></dt><dd><div><p><b>lu</b> is a general purpose library, doing a little bit of everything.</p></div></dd></dl><div></div></div>
<div id="page-nav">
</div>
</div>
<div id="page-footer">Page generated by <a href="https://github.com/adamdruppe/adrdox">adrdox</a></div>
</body>
</html>
42 changes: 42 additions & 0 deletions lu.array.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>lu.array (lu.array)</title>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<link href="style.css" rel="stylesheet" />
<script src="script.js" type="text/javascript"></script>


<link href="search-results.html" rel="prefetch" />
</head>
<body>
<div id="page-header">
<div id="logotype">
<span>lu</span>
<nav>
<a href="http://dlang.org/">Dlang.org</a>
</nav>
</div>

<form action="search-docs.html" id="search">
<input name="searchTerm" placeholder="Find a symbol name..." type="search" />
<input type="submit" value="Go" />
</form>
</div>
<div id="page-body">
<div id="page-content">
<h1>lu.array</h1><div class="breadcrumbs"><a class="breadcrumb" href="lu.html">lu</a> </div><div><div class="documentation-comment synopsis"><div><p>Simple array utilities.</p></div></div></div><div class="annotated-prototype"></div><h2 id="members"><a class="header-anchor" href="#members">Members</a></h2><h3 class="member-list-header hide-from-toc" id="function"><a class="header-anchor" href="#function">Functions</a></h3><dl class="member-list native"><dt><a href="lu.array.uniqueKey.html">uniqueKey</a><div class="simplified-prototype" style="max-width: 49ch;"><span class="lang-feature">auto</span> <span class="name">uniqueKey</span>(AA aa, K min, K max, V value)</div></dt><dd><div><p>Returns a unique key for the passed associative array. Reserves the key by
assigning it a value.</p></div></dd></dl><div><h2 id="examples"><a class="header-anchor" href="#examples">Examples</a></h2><div class="documentation-comment"><div><pre class="d_code highlighted"><span class="type">string</span>[<span class="type">int</span>] <span class="hid">aa</span>;

<span class="kwrd">immutable</span> <span class="hid">key</span> = <span class="hid">aa</span>.<span class="hid">uniqueKey</span>;

<span class="kwrd">assert</span>(<span class="hid">key</span> &gt; <span class="num">0</span>);
<span class="kwrd">assert</span>(<span class="hid">key</span> <span class="kwrd">in</span> <span class="hid">aa</span>);
<span class="kwrd">assert</span>(<span class="hid">aa</span>[<span class="hid">key</span>] == <span class="type">string</span>.<span class="hid">init</span>);</pre></div></div><h2 id="meta"><a class="header-anchor" href="#meta">Meta</a></h2><div class="documentation-comment license-section other-section"><h3 id="license"><a class="header-anchor" href="#license">License</a></h3><div><p><a href="https://www.boost.org/users/license.html">Boost Software License 1.0</a></p></div></div><div class="documentation-comment copyright-section other-section"><h3 id="copyright"><a class="header-anchor" href="#copyright">Copyright</a></h3><div><p><a href="https://github.com/zorael">JR</a></p></div></div><div class="documentation-comment authors-section other-section"><h3 id="authors"><a class="header-anchor" href="#authors">Authors</a></h3><div><p><a href="https://github.com/zorael">JR</a></p></div></div></div></div>
<div id="page-nav"><a class="parent" href="lu.html">lu</a>
<span class="type-separator">modules</span><ul><li><a class="module current" href="lu.array.html">array</a></li><li><a class="module" href="lu.common.html">common</a></li><li><a class="module" href="lu.container.html">container</a></li><li><a class="module" href="lu.conv.html">conv</a></li><li><a class="module" href="lu.deltastrings.html">deltastrings</a></li><li><a class="module" href="lu.json.html">json</a></li><li><a class="module" href="lu.meld.html">meld</a></li><li><a class="module" href="lu.numeric.html">numeric</a></li><li><a class="module" href="lu.objmanip.html">objmanip</a></li><li><a class="module" href="lu.semver.html">semver</a></li><li><a class="module" href="lu.serialisation.html">serialisation</a></li><li><a class="module" href="lu.string.html">string</a></li><li><a class="module" href="lu.traits.html">traits</a></li><li><a class="module" href="lu.typecons.html">typecons</a></li><li><a class="module" href="lu.uda.html">uda</a></li></ul></div>
</div>
<div id="page-footer">Page generated by <a href="https://github.com/adamdruppe/adrdox">adrdox</a></div>
</body>
</html>
66 changes: 66 additions & 0 deletions lu.array.uniqueKey.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>uniqueKey (lu.array.uniqueKey)</title>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<link href="style.css" rel="stylesheet" />
<script src="script.js" type="text/javascript"></script>


<link href="search-results.html" rel="prefetch" />
</head>
<body>
<div id="page-header">
<div id="logotype">
<span>lu</span>
<nav>
<a href="http://dlang.org/">Dlang.org</a>
</nav>
</div>

<form action="search-docs.html" id="search">
<input name="searchTerm" placeholder="Find a symbol name..." type="search" />
<input type="submit" value="Go" />
</form>
</div>
<div id="page-body">
<div id="page-content">
<h1>uniqueKey</h1><div class="breadcrumbs"><a class="breadcrumb" href="lu.html">lu</a> <a class="breadcrumb" href="lu.array.html">array</a> </div><div><div class="documentation-comment synopsis"><div><p>Returns a unique key for the passed associative array. Reserves the key by
assigning it a value.</p><p>Note: This function will end up in an endless loop if a narrow range of indexes
is supplied and the associative array already contains values for all of them.</p></div></div></div><div class="annotated-prototype"><div class="function-prototype"><div class="attributes"></div><div class="return-type"><a class="lang-feature" href="http://dpldocs.info/auto-function-return-prototype">auto</a> </div><div class="function-name">uniqueKey</div><div class="template-parameters" data-count="3">(<div class="parameters-list toplevel"><div class="template-parameter-item parameter-item"> <span><span class="name" data-ident="AA">AA</span> : <span class="name" data-ident="V">V</span>[<span class="name" data-ident="K">K</span>]</span></div><div class="template-parameter-item parameter-item"> <span><span class="name" data-ident="V">V</span></span></div><div class="template-parameter-item parameter-item"> <span><span class="name" data-ident="K">K</span></span></div></div>)</div><div class="runtime-parameters" data-count="4"><div class="parameters-list toplevel"><span class="paren">(</span><div class="runtime-parameter-item parameter-item"><span class="parameter-type-holder"><span class="parameter-type"><span class="storage-class">ref</span> <span class="name" data-ident="AA">AA</span></span></span> <span class="parameter-name name" data-ident="aa"><a href="#param-aa">aa</a></span></div><span class="comma">,</span><div class="runtime-parameter-item parameter-item"><span class="parameter-type-holder"><span class="parameter-type"><span class="name" data-ident="K">K</span></span></span> <span class="parameter-name name" data-ident="min"><a href="#param-min">min</a></span><span class="parameter-default-value">&#160;=&#160;1</span></div><span class="comma">,</span><div class="runtime-parameter-item parameter-item"><span class="parameter-type-holder"><span class="parameter-type"><span class="name" data-ident="K">K</span></span></span> <span class="parameter-name name" data-ident="max"><a href="#param-max">max</a></span><span class="parameter-default-value">&#160;=&#160;<span class="name" data-ident="K">K.max</span></span></div><span class="comma">,</span><div class="runtime-parameter-item parameter-item"><span class="parameter-type-holder"><span class="parameter-type"><span class="name" data-ident="V">V</span></span></span> <span class="parameter-name name" data-ident="value"><a href="#param-value">value</a></span><span class="parameter-default-value">&#160;=&#160;<span class="name" data-ident="V">V.init</span></span></div><span class="paren">)</span></div></div><div class="template-constraint"> <a class="lang-feature" href="http://dpldocs.info/template-constraints">if</a> (<div class="template-constraint-expression"><span class="name" data-ident="isIntegral">isIntegral</span>!<span class="name" data-ident="K">K</span></div>)</div><div class="function-contracts"></div></div></div><div><h2 id="parameters"><a class="header-anchor" href="#parameters">Parameters</a></h2><dl class="parameter-descriptions"><dt id="param-aa"><a class="parameter-name" data-ident="aa" href="#param-aa">aa</a> <span class="parameter-type"><span class="name" data-ident="AA">AA</span></span></dt><dd><div class="documentation-comment"><div><p>Associative array to get a unique key for.</p></div></div></dd><dt id="param-min"><a class="parameter-name" data-ident="min" href="#param-min">min</a> <span class="parameter-type"><span class="name" data-ident="K">K</span></span></dt><dd><div class="documentation-comment"><div><p>Optional minimum key value; defaults to <tt class="inline-code">1</tt>.</p></div></div></dd><dt id="param-max"><a class="parameter-name" data-ident="max" href="#param-max">max</a> <span class="parameter-type"><span class="name" data-ident="K">K</span></span></dt><dd><div class="documentation-comment"><div><p>Optional maximum key value; defaults to <tt class="inline-code">K.max</tt>, where <tt class="inline-code">K</tt> is the
key type of the passed associative array.</p></div></div></dd><dt id="param-value"><a class="parameter-name" data-ident="value" href="#param-value">value</a> <span class="parameter-type"><span class="name" data-ident="V">V</span></span></dt><dd><div class="documentation-comment"><div><p>Optional value to assign to the key; defaults to <tt class="inline-code">V.init</tt>, where
<tt class="inline-code">V</tt> is the value type of the passed associative array.</p></div></div></dd></dl><h2 id="returns"><a class="header-anchor" href="#returns">Return Value</a></h2><div><div class="return-type-holder">Type: <span class="return-type"><a class="lang-feature" href="http://dpldocs.info/auto-function-return-prototype">auto</a> </span></div><div class="documentation-comment returns-description"><div><p>A unique key for the passed associative array. There will exist an array
entry for the key, with the value <tt class="inline-code">value</tt>.</p></div></div></div><h2 id="examples"><a class="header-anchor" href="#examples">Examples</a></h2><div class="documentation-comment"><div><pre class="d_code highlighted"><span class="type">string</span>[<span class="type">int</span>] <span class="hid">aa</span>;
<span class="kwrd">immutable</span> <span class="hid">key</span> = <span class="hid">aa</span>.<span class="hid">uniqueKey</span>;
<span class="kwrd">assert</span>(<span class="hid">key</span> &gt; <span class="num">0</span>);
<span class="kwrd">assert</span>(<span class="hid">key</span> <span class="kwrd">in</span> <span class="hid">aa</span>);
<span class="kwrd">assert</span>(<span class="hid">aa</span>[<span class="hid">key</span>] == <span class="type">string</span>.<span class="hid">init</span>);</pre></div></div><div class="unittest-example-holder"><div class="documentation-comment"></div><pre class="d_code highlighted"><span class="kwrd">import</span> <span class="hid">std</span>.<span class="hid">conv</span> : <span class="hid">to</span>;

{
<span class="type">string</span>[<span class="type">int</span>] <span class="hid">aa</span>;
<span class="kwrd">immutable</span> <span class="hid">key</span> = <span class="hid">aa</span>.<span class="hid">uniqueKey</span>;
<span class="kwrd">assert</span>(<span class="hid">key</span> <span class="kwrd">in</span> <span class="hid">aa</span>);
}
{
<span class="type">long</span>[<span class="type">long</span>] <span class="hid">aa</span>;
<span class="kwrd">immutable</span> <span class="hid">key</span> = <span class="hid">aa</span>.<span class="hid">uniqueKey</span>;
<span class="kwrd">assert</span>(<span class="hid">key</span> <span class="kwrd">in</span> <span class="hid">aa</span>);
}
{
<span class="kwrd">shared</span> <span class="type">bool</span>[<span class="type">int</span>] <span class="hid">aa</span>;
<span class="kwrd">immutable</span> <span class="hid">key</span> = <span class="hid">aa</span>.<span class="hid">uniqueKey</span>;
<span class="kwrd">assert</span>(<span class="hid">key</span> <span class="kwrd">in</span> <span class="hid">aa</span>);
}
{
<span class="type">int</span>[<span class="type">int</span>] <span class="hid">aa</span>;
<span class="kwrd">immutable</span> <span class="hid">key</span> = <span class="hid">aa</span>.<span class="hid">uniqueKey</span>(<span class="num">5</span>, <span class="num">6</span>, <span class="num">42</span>);
<span class="kwrd">assert</span>(<span class="hid">key</span> == <span class="num">5</span>);
<span class="kwrd">assert</span>((<span class="hid">aa</span>[<span class="num">5</span>] == <span class="num">42</span>), <span class="hid">aa</span>[<span class="num">5</span>].<span class="hid">to</span>!<span class="type">string</span>);
}</pre></div></div></div>
<div id="page-nav"><a class="parent" href="lu.html">lu</a> <a class="parent" href="lu.array.html">array</a>
<span class="type-separator">functions</span><ul><li><a class="function current" href="lu.array.uniqueKey.html">uniqueKey</a></li></ul></div>
</div>
<div id="page-footer">Page generated by <a href="https://github.com/adamdruppe/adrdox">adrdox</a></div>
</body>
</html>

0 comments on commit 5688da6

Please sign in to comment.