Skip to content

Commit 2911403

Browse files
authored
various updates (#32)
1 parent 4b67028 commit 2911403

File tree

11 files changed

+816
-812
lines changed

11 files changed

+816
-812
lines changed

.JuliaFormatter

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"
12+
- package-ecosystem: "julia"
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"

.github/workflows/ci.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
push:
66
branches: [main]
77

8-
concurrency:
8+
concurrency:
99
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1010
cancel-in-progress: true
1111

@@ -22,24 +22,16 @@ jobs:
2222
- '1'
2323
experimental:
2424
- false
25-
os: [ubuntu-latest]
25+
os: [ubuntu-latest, windows-latest, macos-latest]
2626
arch: [x64]
27-
include: # spare windows/macos CI credits
28-
- os: windows-latest
29-
experimental: false
30-
version: '1'
31-
arch: x64
32-
- os: macos-latest
33-
experimental: false
34-
version: '1'
35-
arch: x64
27+
include:
3628
- os: ubuntu-latest
3729
experimental: true
3830
version: 'pre'
3931
arch: x64
4032

4133
steps:
42-
- uses: actions/checkout@v5
34+
- uses: actions/checkout@v6
4335
- uses: julia-actions/setup-julia@latest
4436
with:
4537
version: ${{ matrix.version }}
@@ -48,7 +40,7 @@ jobs:
4840
- uses: julia-actions/julia-buildpkg@latest
4941
- uses: julia-actions/julia-runtest@latest
5042
- uses: julia-actions/julia-processcoverage@latest
51-
- uses: codecov/codecov-action@v4
43+
- uses: codecov/codecov-action@v5
5244
with:
5345
token: ${{ secrets.CODECOV_TOKEN }}
5446
fail_ci_if_error: false

.github/workflows/format-check.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/format.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: format
2+
3+
on:
4+
push:
5+
branches: ['release-', 'main']
6+
tags:
7+
- '*'
8+
pull_request:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
runic:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v6
19+
- uses: julia-actions/setup-julia@latest
20+
- uses: julia-actions/cache@v2
21+
- uses: fredrikekre/runic-action@v1
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
name: TagBot
2+
23
on:
34
issue_comment:
45
types:
56
- created
67
workflow_dispatch:
8+
inputs:
9+
lookback:
10+
default: 10
11+
712
jobs:
8-
TagBot:
13+
tagbot:
914
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
1015
runs-on: ubuntu-latest
1116
steps:
1217
- uses: JuliaRegistries/TagBot@v1
1318
with:
1419
token: ${{ secrets.GITHUB_TOKEN }}
15-
ssh: ${{ secrets.DOCUMENTER_KEY }}
20+
ssh: ${{ secrets.DOCUMENTER_KEY }}

.pre-commit-config.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v5.0.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- id: end-of-file-fixer
9+
- id: check-toml
10+
- id: check-yaml
11+
- id: check-added-large-files
12+
- repo: https://github.com/fredrikekre/runic-pre-commit
13+
rev: v2.0.1
14+
hooks:
15+
- id: runic

ref/check.jl

Lines changed: 95 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,109 @@
11
using MarchingCubes
22

33
main() = begin
4-
run(`gcc main.c`)
4+
run(`gcc main.c`)
55

6-
println("== 2d ==")
7-
for (l, sym) enumerate((
8-
:cases,
9-
:tiling1,
10-
:tiling2,
11-
:tiling3_1,
12-
:tiling3_2,
13-
:tiling4_1,
14-
:tiling4_2,
15-
:tiling5,
16-
:test6,
17-
:tiling6_1_1,
18-
:tiling6_1_2,
19-
:tiling6_2,
20-
:test7,
21-
:tiling7_1,
22-
:tiling7_4_1,
23-
:tiling7_4_2,
24-
:tiling8,
25-
:tiling9,
26-
:test10,
27-
:tiling10_1_1,
28-
:tiling10_1_1_,
29-
:tiling10_1_2,
30-
:tiling10_2,
31-
:tiling10_2_,
32-
:tiling11,
33-
:test12,
34-
:tiling12_1_1,
35-
:tiling12_1_1_,
36-
:tiling12_1_2,
37-
:tiling12_2,
38-
:tiling12_2_,
39-
:test13,
40-
:tiling13_1,
41-
:tiling13_1_,
42-
:tiling14,
43-
:casesClassic,
44-
))
45-
@show sym, l
46-
lut = getfield(MarchingCubes, sym)
47-
o = sym (:test6, :test7, :test10, :test12, :test13) ? 0 : 1
48-
for i 1:length(lut)
49-
for j 1:length(first(lut))
50-
io = PipeBuffer()
51-
pipeline(`./a.out $l $(i - 1) $(j - 1)`; stdout=io, stderr=devnull) |> run
52-
val = parse(Int, read(io, String) |> rstrip) + o
53-
@assert val == lut[i][j] ((i, j), val, lut[i][j])
54-
end
6+
println("== 2d ==")
7+
for (l, sym) in enumerate(
8+
(
9+
:cases,
10+
:tiling1,
11+
:tiling2,
12+
:tiling3_1,
13+
:tiling3_2,
14+
:tiling4_1,
15+
:tiling4_2,
16+
:tiling5,
17+
:test6,
18+
:tiling6_1_1,
19+
:tiling6_1_2,
20+
:tiling6_2,
21+
:test7,
22+
:tiling7_1,
23+
:tiling7_4_1,
24+
:tiling7_4_2,
25+
:tiling8,
26+
:tiling9,
27+
:test10,
28+
:tiling10_1_1,
29+
:tiling10_1_1_,
30+
:tiling10_1_2,
31+
:tiling10_2,
32+
:tiling10_2_,
33+
:tiling11,
34+
:test12,
35+
:tiling12_1_1,
36+
:tiling12_1_1_,
37+
:tiling12_1_2,
38+
:tiling12_2,
39+
:tiling12_2_,
40+
:test13,
41+
:tiling13_1,
42+
:tiling13_1_,
43+
:tiling14,
44+
:casesClassic,
45+
)
46+
)
47+
@show sym, l
48+
lut = getfield(MarchingCubes, sym)
49+
o = sym (:test6, :test7, :test10, :test12, :test13) ? 0 : 1
50+
for i in 1:length(lut)
51+
for j in 1:length(first(lut))
52+
io = PipeBuffer()
53+
pipeline(`./a.out $l $(i - 1) $(j - 1)`; stdout = io, stderr = devnull) |> run
54+
val = parse(Int, read(io, String) |> rstrip) + o
55+
@assert val == lut[i][j] ((i, j), val, lut[i][j])
56+
end
57+
end
5558
end
56-
end
5759

58-
println("== 1d ==")
59-
for (l, sym) enumerate((
60-
:test3,
61-
:test4,
62-
:subcfg13
63-
))
64-
@show sym, l
65-
lut = getfield(MarchingCubes, sym)
66-
for i 1:length(lut)
67-
io = PipeBuffer()
68-
pipeline(`./a.out $(100 + l) $(i - 1)`; stdout=io, stderr=devnull) |> run
69-
val = parse(Int, read(io, String) |> rstrip)
70-
@assert val == lut[i] (i, val, lut[i])
60+
println("== 1d ==")
61+
for (l, sym) in enumerate(
62+
(
63+
:test3,
64+
:test4,
65+
:subcfg13,
66+
)
67+
)
68+
@show sym, l
69+
lut = getfield(MarchingCubes, sym)
70+
for i in 1:length(lut)
71+
io = PipeBuffer()
72+
pipeline(`./a.out $(100 + l) $(i - 1)`; stdout = io, stderr = devnull) |> run
73+
val = parse(Int, read(io, String) |> rstrip)
74+
@assert val == lut[i] (i, val, lut[i])
75+
end
7176
end
72-
end
7377

74-
println("== 3d ==")
75-
for (l, sym) enumerate((
76-
:tiling7_2,
77-
:tiling7_3,
78-
:tiling13_2,
79-
:tiling13_2_,
80-
:tiling13_3,
81-
:tiling13_3_,
82-
:tiling13_4,
83-
:tiling13_5_1,
84-
:tiling13_5_2,
85-
))
86-
@show sym, l
87-
lut = getfield(MarchingCubes, sym)
88-
for i 1:length(lut)
89-
for j 1:length(first(lut))
90-
for k 1:length(first(first(lut)))
91-
io = PipeBuffer()
92-
pipeline(`./a.out $(200 + l) $(i - 1) $(j - 1) $(k - 1)`; stdout=io, stderr=devnull) |> run
93-
val = parse(Int, read(io, String) |> rstrip) + 1
94-
@assert val == lut[i][j][k] ((i, j, k), val, lut[i][j][k])
78+
println("== 3d ==")
79+
for (l, sym) in enumerate(
80+
(
81+
:tiling7_2,
82+
:tiling7_3,
83+
:tiling13_2,
84+
:tiling13_2_,
85+
:tiling13_3,
86+
:tiling13_3_,
87+
:tiling13_4,
88+
:tiling13_5_1,
89+
:tiling13_5_2,
90+
)
91+
)
92+
@show sym, l
93+
lut = getfield(MarchingCubes, sym)
94+
for i in 1:length(lut)
95+
for j in 1:length(first(lut))
96+
for k in 1:length(first(first(lut)))
97+
io = PipeBuffer()
98+
pipeline(`./a.out $(200 + l) $(i - 1) $(j - 1) $(k - 1)`; stdout = io, stderr = devnull) |> run
99+
val = parse(Int, read(io, String) |> rstrip) + 1
100+
@assert val == lut[i][j][k] ((i, j, k), val, lut[i][j][k])
101+
end
102+
end
95103
end
96-
end
97104
end
98-
end
99105

100-
return
106+
return
101107
end
102108

103109
main()

0 commit comments

Comments
 (0)