4 Commits

Author SHA1 Message Date
2e246eb1c8 Remove Nix caching that can't work due to /nix/store permissions
All checks were successful
Test, Build, and Release / test (push) Successful in 1m13s
Test, Build, and Release / build (push) Successful in 1m23s
2025-01-23 17:59:47 -06:00
ba340ae56f Update README to reflect demo
Some checks failed
Test, Build, and Release / build (push) Has been cancelled
Test, Build, and Release / test (push) Has been cancelled
2025-01-23 17:36:39 -06:00
739851c864 Minify and mark as pre-release
Some checks failed
Test, Build, and Release / test (push) Successful in 1m59s
Test, Build, and Release / build (push) Failing after 2m12s
2025-01-23 17:23:02 -06:00
8995efce15 Release 0.6.0
All checks were successful
Test, Build, and Release / test (push) Successful in 1m38s
Test, Build, and Release / build (push) Successful in 1m40s
2025-01-23 16:44:14 -06:00
4 changed files with 34 additions and 52 deletions

View File

@ -1,13 +1,9 @@
name: Test and Build
name: Test, Build, and Release
on:
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
tags:
- '*'
jobs:
test:
@ -17,8 +13,9 @@ jobs:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up cache for Cabal
uses: actions/cache@v4
@ -31,16 +28,6 @@ jobs:
restore-keys: |
cabal-
- name: Set up cache for Nix
uses: actions/cache@v4
with:
path: |
/nix/store
/nix/var/nix/cache
key: nix-${{ hashFiles('flake.lock') }}
restore-keys: |
nix-
- name: Initialize Cabal and update package list
run: |
nix develop --command cabal update
@ -57,32 +44,26 @@ jobs:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up cache for Cabal
uses: actions/cache@v4
- uses: actions/checkout@v3
with:
path: |
~/.cache/cabal
~/.config/cabal
~/.local/state/cabal
key: cabal-${{ hashFiles('tricu.cabal') }}
restore-keys: |
cabal-
fetch-depth: 0
- name: Set up cache for Nix
uses: actions/cache@v4
with:
path: |
/nix/store
/nix/var/nix/cache
key: nix-${{ hashFiles('flake.lock') }}
restore-keys: |
nix-
- name: Build binary
- name: Build and shrink binary
run: |
nix build
ls -alh ./result/bin/tricu
cp -L ./result/bin/tricu ./tricu
chmod 755 ./tricu
nix develop --command upx ./tricu
- name: Setup go for release action
uses: actions/setup-go@v5
with:
go-version: '>=1.20.1'
- name: Release binary
uses: https://gitea.com/actions/release-action@main
with:
files: |-
./tricu
api_key: '${{ secrets.RELEASE_TOKEN }}'
pre_release: true

View File

@ -16,7 +16,7 @@ These features move us cleanly out of the [turing tarpit](https://en.wikipedia.o
tricu is the word for "tree" in Lojban: `(x1) is a tree of species/cultivar (x2)`. This project was named "sapling" until I discovered the name is already being used for other (completely unrelated) programming language development projects.
## What does it look like?
## REPL examples
```
tricu < -- Anything after `--` on a single line is a comment
@ -31,7 +31,7 @@ tricu < triage = (\a b c : t (t a b) c)
tricu < test = triage "Leaf" (\z : "Stem") (\a b : "Fork")
tricu < test (t t)
tricu > "Stem"
tricu < -- We can even write a function to convert a term back to source code
tricu < -- We can even convert a term back to source code (/demos/toSource.tri)
tricu < toSource not?
tricu > "(t (t (t t) (t t t)) (t t (t t t)))"
```
@ -79,4 +79,4 @@ tricu decode [OPTIONS]
Tree Calculus was discovered by [Barry Jay](https://github.com/barry-jay-personal/blog).
[treecalcul.us](https://treecalcul.us) is an excellent website with an intuitive playground created by [Johannes Bader](https://johannes-bader.com/) that introduced me to Tree Calculus. If tricu sounds interesting but compiling this repo sounds like a hassle, you should check out his site.
[treecalcul.us](https://treecalcul.us) is an excellent website with an intuitive Tree Calculus code playground created by [Johannes Bader](https://johannes-bader.com/) that introduced me to Tree Calculus.

View File

@ -32,10 +32,11 @@
defaultPackage = self.packages.${system}.default;
devShells.default = pkgs.mkShell {
buildInputs = with pkgs.haskellPackages; [
cabal-install
ghcid
buildInputs = with pkgs; [
haskellPackages.cabal-install
haskellPackages.ghcid
customGHC
upx
];
inputsFrom = builtins.attrValues self.packages.${system};
};

View File

@ -1,7 +1,7 @@
cabal-version: 1.12
name: tricu
version: 0.6.0
version: 0.7.0
description: A micro-language for exploring Tree Calculus
author: James Eversole
maintainer: james@eversole.co