Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
adamperkowski committed Dec 16, 2024
0 parents commit bacbc43
Show file tree
Hide file tree
Showing 9 changed files with 1,777 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/jule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Jule CI
on: [push]

jobs:
jule:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install JuleC
run: |
mkdir julec
cd julec
bash <(curl -s https://raw.githubusercontent.com/julelang/julec-ir/main/compile-ir.sh)
echo "$(pwd)/jule-master/bin" >> $GITHUB_PATH
cd ..
- name: Install JuleFmt
run: |
git clone https://github.com/julelang/julefmt.git --depth=1
cd julefmt
mkdir -p bin
julec --opt-deadcode -o bin/julefmt ./src
echo "$(pwd)/bin" >> $GITHUB_PATH
cd ..
- name: Build
run: |
make
- name: Test
run: |
make test
- name: Format
run: |
make format
- name: Clean up
run: |
make clean
rm -rf julec julefmt
- name: Check formatting
run: |
git diff --quiet || { echo 'Please run `make format` and push the changes.' exit 1; }
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin
dist
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
JULEC = julec

BINARY = aoc

# JULECFLAGS = --opt L2 --production
JULECFLAGS = -o bin/$(BINARY)

all: build

build:
mkdir -p bin
$(JULEC) $(JULECFLAGS) .

run: build
./bin/$(BINARY)

test: build
$(JULEC) test $(JULECFLAGS) .

format:
julefmt -w .

clean:
rm -rf bin dist

.PHONY: all build run test format clean
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
my advent of code stuff

license
```
aoc_jule Copyright (C) 2024 Adam Perkowski
```

```
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License, version 3 for more details.
```
9 changes: 9 additions & 0 deletions _2024/_01/01.jule
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// aoc_jule Copyright (C) 2024 Adam Perkowski
// https://github.com/adamperkowski/aoc_jule
// https://adventofcode.com/2024/day/1

fn calculateMetrics(input: str) {}

fn Run() {
println("Hello, world!")
}
Loading

0 comments on commit bacbc43

Please sign in to comment.