Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 0 additions & 14 deletions .JuliaFormatter

This file was deleted.

15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "julia"
directory: "/"
schedule:
interval: "weekly"
18 changes: 5 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
branches: [main]

concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

Expand All @@ -22,24 +22,16 @@ jobs:
- '1'
experimental:
- false
os: [ubuntu-latest]
os: [ubuntu-latest, windows-latest, macos-latest]
arch: [x64]
include: # spare windows/macos CI credits
- os: windows-latest
experimental: false
version: '1'
arch: x64
- os: macos-latest
experimental: false
version: '1'
arch: x64
include:
- os: ubuntu-latest
experimental: true
version: 'pre'
arch: x64

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
Expand All @@ -48,7 +40,7 @@ jobs:
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
- uses: julia-actions/julia-processcoverage@latest
- uses: codecov/codecov-action@v4
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/format-check.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: format

on:
push:
branches: ['release-', 'main']
tags:
- '*'
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
runic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@latest
- uses: julia-actions/cache@v2
- uses: fredrikekre/runic-action@v1
9 changes: 7 additions & 2 deletions .github/workflows/TagBot.yml → .github/workflows/tagbot.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
name: TagBot

on:
issue_comment:
types:
- created
workflow_dispatch:
inputs:
lookback:
default: 10

jobs:
TagBot:
tagbot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
15 changes: 15 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-toml
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/fredrikekre/runic-pre-commit
rev: v2.0.1
hooks:
- id: runic
184 changes: 95 additions & 89 deletions ref/check.jl
Original file line number Diff line number Diff line change
@@ -1,103 +1,109 @@
using MarchingCubes

main() = begin
run(`gcc main.c`)
run(`gcc main.c`)

println("== 2d ==")
for (l, sym) ∈ enumerate((
:cases,
:tiling1,
:tiling2,
:tiling3_1,
:tiling3_2,
:tiling4_1,
:tiling4_2,
:tiling5,
:test6,
:tiling6_1_1,
:tiling6_1_2,
:tiling6_2,
:test7,
:tiling7_1,
:tiling7_4_1,
:tiling7_4_2,
:tiling8,
:tiling9,
:test10,
:tiling10_1_1,
:tiling10_1_1_,
:tiling10_1_2,
:tiling10_2,
:tiling10_2_,
:tiling11,
:test12,
:tiling12_1_1,
:tiling12_1_1_,
:tiling12_1_2,
:tiling12_2,
:tiling12_2_,
:test13,
:tiling13_1,
:tiling13_1_,
:tiling14,
:casesClassic,
))
@show sym, l
lut = getfield(MarchingCubes, sym)
o = sym ∈ (:test6, :test7, :test10, :test12, :test13) ? 0 : 1
for i ∈ 1:length(lut)
for j ∈ 1:length(first(lut))
io = PipeBuffer()
pipeline(`./a.out $l $(i - 1) $(j - 1)`; stdout=io, stderr=devnull) |> run
val = parse(Int, read(io, String) |> rstrip) + o
@assert val == lut[i][j] ((i, j), val, lut[i][j])
end
println("== 2d ==")
for (l, sym) in enumerate(
(
:cases,
:tiling1,
:tiling2,
:tiling3_1,
:tiling3_2,
:tiling4_1,
:tiling4_2,
:tiling5,
:test6,
:tiling6_1_1,
:tiling6_1_2,
:tiling6_2,
:test7,
:tiling7_1,
:tiling7_4_1,
:tiling7_4_2,
:tiling8,
:tiling9,
:test10,
:tiling10_1_1,
:tiling10_1_1_,
:tiling10_1_2,
:tiling10_2,
:tiling10_2_,
:tiling11,
:test12,
:tiling12_1_1,
:tiling12_1_1_,
:tiling12_1_2,
:tiling12_2,
:tiling12_2_,
:test13,
:tiling13_1,
:tiling13_1_,
:tiling14,
:casesClassic,
)
)
@show sym, l
lut = getfield(MarchingCubes, sym)
o = sym ∈ (:test6, :test7, :test10, :test12, :test13) ? 0 : 1
for i in 1:length(lut)
for j in 1:length(first(lut))
io = PipeBuffer()
pipeline(`./a.out $l $(i - 1) $(j - 1)`; stdout = io, stderr = devnull) |> run
val = parse(Int, read(io, String) |> rstrip) + o
@assert val == lut[i][j] ((i, j), val, lut[i][j])
end
end
end
end

println("== 1d ==")
for (l, sym) ∈ enumerate((
:test3,
:test4,
:subcfg13
))
@show sym, l
lut = getfield(MarchingCubes, sym)
for i ∈ 1:length(lut)
io = PipeBuffer()
pipeline(`./a.out $(100 + l) $(i - 1)`; stdout=io, stderr=devnull) |> run
val = parse(Int, read(io, String) |> rstrip)
@assert val == lut[i] (i, val, lut[i])
println("== 1d ==")
for (l, sym) in enumerate(
(
:test3,
:test4,
:subcfg13,
)
)
@show sym, l
lut = getfield(MarchingCubes, sym)
for i in 1:length(lut)
io = PipeBuffer()
pipeline(`./a.out $(100 + l) $(i - 1)`; stdout = io, stderr = devnull) |> run
val = parse(Int, read(io, String) |> rstrip)
@assert val == lut[i] (i, val, lut[i])
end
end
end

println("== 3d ==")
for (l, sym) ∈ enumerate((
:tiling7_2,
:tiling7_3,
:tiling13_2,
:tiling13_2_,
:tiling13_3,
:tiling13_3_,
:tiling13_4,
:tiling13_5_1,
:tiling13_5_2,
))
@show sym, l
lut = getfield(MarchingCubes, sym)
for i ∈ 1:length(lut)
for j ∈ 1:length(first(lut))
for k ∈ 1:length(first(first(lut)))
io = PipeBuffer()
pipeline(`./a.out $(200 + l) $(i - 1) $(j - 1) $(k - 1)`; stdout=io, stderr=devnull) |> run
val = parse(Int, read(io, String) |> rstrip) + 1
@assert val == lut[i][j][k] ((i, j, k), val, lut[i][j][k])
println("== 3d ==")
for (l, sym) in enumerate(
(
:tiling7_2,
:tiling7_3,
:tiling13_2,
:tiling13_2_,
:tiling13_3,
:tiling13_3_,
:tiling13_4,
:tiling13_5_1,
:tiling13_5_2,
)
)
@show sym, l
lut = getfield(MarchingCubes, sym)
for i in 1:length(lut)
for j in 1:length(first(lut))
for k in 1:length(first(first(lut)))
io = PipeBuffer()
pipeline(`./a.out $(200 + l) $(i - 1) $(j - 1) $(k - 1)`; stdout = io, stderr = devnull) |> run
val = parse(Int, read(io, String) |> rstrip) + 1
@assert val == lut[i][j][k] ((i, j, k), val, lut[i][j][k])
end
end
end
end
end
end

return
return
end

main()
Loading
Loading