Skip to content

Commit ee81411

Browse files
authored
Merge pull request #122 from OpenSourceAWE/makie
Add Makie extension
2 parents f114de5 + 675446f commit ee81411

40 files changed

+1801
-5171
lines changed

.github/workflows/BuildArtifacts.yml

Lines changed: 48 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,24 @@ jobs:
7373
strategy:
7474
fail-fast: true
7575
matrix:
76-
julia-version: ['1.10', '1.11']
76+
julia-version: ['1', 'lts']
7777

7878
steps:
7979
- name: Checkout code
8080
uses: actions/checkout@v5
8181

82-
- name: Install matplotlib
83-
run: if [ "$RUNNER_OS" = "Linux" ]; then sudo apt-get update && sudo apt-get install -y python3-matplotlib; fi
84-
shell: bash
85-
8682
- name: Setup Julia ${{ matrix.julia-version }}
8783
uses: julia-actions/setup-julia@v2
8884
with:
8985
version: ${{ matrix.julia-version }}
9086

87+
- name: Detect Julia version
88+
id: detect_version
89+
run: |
90+
JULIA_VERSION=$(julia --version | cut -d' ' -f3 | cut -d'.' -f1,2)
91+
echo "version=$JULIA_VERSION" >> $GITHUB_OUTPUT
92+
echo "Detected Julia version: $JULIA_VERSION"
93+
9194
- name: Install ArtifactUtils package
9295
run: julia -e 'using Pkg; Pkg.add("ArtifactUtils");'
9396

@@ -103,15 +106,15 @@ jobs:
103106
- name: Upload tar.gz artifacts
104107
uses: actions/upload-artifact@v4
105108
with:
106-
name: model-tarballs-${{ matrix.julia-version }}
107-
path: data/models_v${{ matrix.julia-version }}.tar.gz
109+
name: model-tarballs-${{ steps.detect_version.outputs.version }}
110+
path: data/models_v${{ steps.detect_version.outputs.version }}.tar.gz
108111
retention-days: 7
109112

110113
# Upload the entire workspace to capture the generated TOML files.
111-
- name: Upload workspace for Julia ${{ matrix.julia-version }}
114+
- name: Upload workspace for Julia ${{ steps.detect_version.outputs.version }}
112115
uses: actions/upload-artifact@v4
113116
with:
114-
name: workspace-${{ matrix.julia-version }}
117+
name: workspace-${{ steps.detect_version.outputs.version }}
115118
path: .
116119
retention-days: 1
117120

@@ -150,33 +153,49 @@ jobs:
150153
- name: Checkout a clean version of the code
151154
uses: actions/checkout@v5
152155

153-
# Download only the specific workspace artifacts needed.
154-
- name: Download workspace-1.10 artifact
155-
uses: actions/download-artifact@v4
156-
with:
157-
name: workspace-1.10
158-
path: ./artifacts/workspace-1.10
159-
160-
- name: Download workspace-1.11 artifact
156+
# Download all workspace artifacts (regardless of version)
157+
- name: Download all workspace artifacts
161158
uses: actions/download-artifact@v4
162159
with:
163-
name: workspace-1.11
164-
path: ./artifacts/workspace-1.11
160+
pattern: workspace-*
161+
path: ./artifacts
165162

166163
# Merge the version-specific artifact files and restore manifests.
167164
- name: Merge and Restore TOML files from artifacts
168165
run: |
169166
echo "Merging version-specific Artifacts.toml files..."
170-
# Use cat to concatenate the two files into one.
171-
# A blank line is added between them for readability.
172-
cat ./artifacts/workspace-1.10/Artifacts-v1.10.toml.default > Artifacts.toml.default
173-
echo "" >> Artifacts.toml.default
174-
cat ./artifacts/workspace-1.11/Artifacts-v1.11.toml.default >> Artifacts.toml.default
167+
168+
# Find all workspace directories
169+
workspaces=$(find ./artifacts -maxdepth 1 -type d -name "workspace-*" | sort)
170+
171+
# Initialize the merged Artifacts.toml.default
172+
> Artifacts.toml.default
173+
174+
# Process each workspace
175+
first=true
176+
for workspace in $workspaces; do
177+
version=$(basename "$workspace" | sed 's/workspace-//')
178+
echo "Processing workspace for Julia $version..."
179+
180+
# Merge Artifacts.toml files
181+
artifacts_file="$workspace/Artifacts-v${version}.toml.default"
182+
if [ -f "$artifacts_file" ]; then
183+
if [ "$first" = false ]; then
184+
echo "" >> Artifacts.toml.default
185+
fi
186+
cat "$artifacts_file" >> Artifacts.toml.default
187+
first=false
188+
fi
189+
190+
# Copy manifest files
191+
manifest_file="$workspace/Manifest-v${version}.toml.default"
192+
if [ -f "$manifest_file" ]; then
193+
cp "$manifest_file" "./Manifest-v${version}.toml.default"
194+
echo "Copied Manifest-v${version}.toml.default"
195+
fi
196+
done
197+
175198
echo "Final Artifacts.toml.default created."
176-
177-
echo "Copying manifest files..."
178-
cp ./artifacts/workspace-1.10/Manifest-v1.10.toml.default ./Manifest-v1.10.toml.default
179-
cp ./artifacts/workspace-1.11/Manifest-v1.11.toml.default ./Manifest-v1.11.toml.default
180199
echo "Files restored."
181200
182201
# Generate a token from the GitHub App to authorize the PR creation
@@ -202,5 +221,4 @@ jobs:
202221
# Add the paths for all the files you want to include in the PR.
203222
add-paths: |
204223
Artifacts.toml.default
205-
Manifest-v1.10.toml.default
206-
Manifest-v1.11.toml.default
224+
Manifest-v*.toml.default

.github/workflows/CI.yml

Lines changed: 14 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,10 @@ jobs:
1818
reuse-lint:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- name: Checkout code
22-
uses: actions/checkout@v5
23-
with:
24-
ref: ${{ github.event.client_payload.ref || github.head_ref || github.ref }}
25-
21+
- uses: actions/checkout@v5
22+
2623
- name: Run REUSE lint
27-
run: |
28-
docker run --rm --volume ${{ github.workspace }}:/data fsfe/reuse lint
24+
run: docker run --rm --volume ${{ github.workspace }}:/data fsfe/reuse lint
2925

3026
test-with-code-coverage:
3127
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
@@ -35,8 +31,8 @@ jobs:
3531
fail-fast: false
3632
matrix:
3733
version:
38-
- '1.10'
39-
- '1.11'
34+
- '1' # Latest stable release
35+
- 'lts' # Long-term support release
4036
os:
4137
- ubuntu-latest
4238
- windows-latest
@@ -45,36 +41,17 @@ jobs:
4541
include:
4642
- os: macOS-latest
4743
arch: aarch64
48-
version: 1.11
44+
version: '1'
4945
steps:
50-
- name: Checkout code
51-
uses: actions/checkout@v5
52-
with:
53-
ref: ${{ github.event.client_payload.ref || github.head_ref || github.ref }}
54-
55-
- name: Copy default Manifest files
56-
run: |
57-
cp Manifest-v${{ matrix.version }}.toml.default Manifest.toml ||
58-
echo "No default available for Manifest-v${{ matrix.version }}.toml"
59-
shell: bash
60-
61-
- name: Install matplotlib
62-
run: if [ "$RUNNER_OS" = "Linux" ]; then sudo apt-get install -y python3-matplotlib; fi
63-
shell: bash
46+
- uses: actions/checkout@v5
6447

6548
- uses: julia-actions/setup-julia@v2
6649
with:
6750
version: ${{ matrix.version }}
6851
arch: ${{ matrix.arch }}
6952

7053
- uses: julia-actions/cache@v2
71-
7254
- uses: julia-actions/julia-buildpkg@v1
73-
74-
- name: Build PyCall
75-
run: julia --project -e 'ENV["SAM_PRECOMPILE"]="false"; ENV["PYTHON"]=""; using Pkg; Pkg.instantiate(); Pkg.add("PyCall"); Pkg.build("PyCall")'
76-
shell: bash
77-
7855
- uses: julia-actions/julia-runtest@v1
7956

8057
- name: Upload PNG plots as artifact
@@ -99,36 +76,21 @@ jobs:
9976
runs-on: ubuntu-latest
10077
timeout-minutes: 120
10178
steps:
102-
- name: Checkout code
103-
uses: actions/checkout@v5
104-
with:
105-
ref: ${{ github.event.client_payload.ref || github.head_ref || github.ref }}
79+
- uses: actions/checkout@v5
10680

107-
- name: Copy default Manifest files
108-
run: |
109-
cp Manifest-v1.11.toml.default Manifest.toml ||
110-
echo "No default available for Manifest-v1.11.toml"
111-
shell: bash
112-
113-
- name: Install matplotlib
114-
run: sudo apt-get install -y python3-matplotlib
115-
shell: bash
116-
11781
- uses: julia-actions/setup-julia@v2
118-
119-
- uses: julia-actions/cache@v2
82+
with:
83+
version: '1'
12084

85+
- uses: julia-actions/cache@v2
12186
- uses: julia-actions/julia-buildpkg@v1
122-
123-
- name: Build PyCall
124-
run: julia --project=docs/ -e 'ENV["SAM_PRECOMPILE"]="false"; ENV["PYTHON"]=""; using Pkg; Pkg.instantiate(); Pkg.add("PyCall"); Pkg.build("PyCall")'
125-
shell: bash
126-
12787
- uses: julia-actions/julia-docdeploy@v1
12888
env:
12989
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13090
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
131-
- run: |
91+
92+
- name: Run doctests
93+
run: |
13294
julia --project=docs -e '
13395
using Documenter: DocMeta, doctest
13496
using KiteUtils

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
*.xopp
99
*.so
1010
*.so.bak
11+
Manifest.toml
12+
Manifest*.toml
13+
Manifest*.default
1114
data/*.png
1215
/Manifest.toml
1316
/Manifest.toml.1.7

0 commit comments

Comments
 (0)