Skip to content

Commit 265ee0e

Browse files
committed
Merge branch 'develop'
2 parents 2dedb95 + 79ae03f commit 265ee0e

63 files changed

Lines changed: 3352 additions & 1346 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Keep the Docker build context small and the layers reproducible.
2+
# NOTE: public/ (including the 17MB vendored pyodide runtime) must stay in the
3+
# context — Vite copies it into dist/ and the wheels stage reads public/flamapy.
4+
5+
.git
6+
.github
7+
.claude
8+
node_modules
9+
dist
10+
dist-ssr
11+
12+
# Python tooling / tests (the wheels stage only needs Makefile, scripts/,
13+
# flamapy.version and public/flamapy)
14+
tests
15+
.pytest_cache
16+
__pycache__
17+
**/__pycache__
18+
env
19+
.venv
20+
21+
# Local files
22+
*.log
23+
.env
24+
.env.*
25+
.DS_Store
26+
.vscode
27+
.idea
28+
CLAUDE.md
29+
start_coding.sh

.github/workflows/deploy-pages.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
name: Deploy to GitHub Pages
22

3+
# Production deploy is tag-driven: a non-dev version tag (v1.2.3) publishes the
4+
# site. Dev tags (v1.2.3.dev0) are previews and do not deploy. Pushing to main
5+
# no longer deploys.
36
on:
47
push:
5-
branches: [main]
8+
tags:
9+
- v[0-9]+.[0-9]+.*
610
workflow_dispatch:
711

812
permissions:
@@ -17,6 +21,7 @@ concurrency:
1721
jobs:
1822
build:
1923
runs-on: ubuntu-latest
24+
if: ${{ github.event_name == 'workflow_dispatch' || !contains(github.ref, 'dev') }}
2025
steps:
2126
- uses: actions/checkout@v4
2227

@@ -44,6 +49,9 @@ jobs:
4449
- name: Build
4550
env:
4651
VITE_BASE_PATH: ${{ steps.pages.outputs.base_path }}/
52+
# GA4 measurement ID, inlined by Vite at build time (empty -> GA off),
53+
# matching the Docker build so the Pages site reports analytics too.
54+
VITE_GA_MEASUREMENT_ID: ${{ secrets.VITE_GA_MEASUREMENT_ID }}
4755
run: npm run build
4856

4957
- name: SPA fallback

.github/workflows/docker-image.yml

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

.github/workflows/lint.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Lint
1+
name: Lint & Frontend tests
22

33
on:
44
pull_request:
@@ -19,11 +19,19 @@ jobs:
1919
- name: Set up Node.js
2020
uses: actions/setup-node@v4
2121
with:
22-
node-version: 20
22+
node-version: 22
2323
cache: npm
2424

2525
- name: Install dependencies
2626
run: npm ci
2727

2828
- name: Run ESLint
2929
run: npm run lint
30+
31+
- name: Run frontend tests
32+
run: npm test
33+
34+
# Catch build breakage before a release tag does (the flamapy wheels are
35+
# not needed for the bundle to build — Vite just copies public/).
36+
- name: Build
37+
run: npm run build

.github/workflows/pytest.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
pull_request:
55
branches:
66
- main
7+
push:
8+
branches:
9+
- develop
710

811
jobs:
912
test:

.github/workflows/release.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Release
2+
3+
# Tag-driven release, mirroring the .dev tag schema of the flamapy packages.
4+
# v1.2.3 -> docker :latest + :1.2.3, GitHub release, Render deploy
5+
# v1.2.3.dev0 -> docker :dev + :1.2.3.dev0 only (preview, no release/deploy)
6+
# Pushing to main no longer deploys; push a version tag to ship.
7+
on:
8+
push:
9+
tags:
10+
- v[0-9]+.[0-9]+.*
11+
12+
jobs:
13+
docker:
14+
name: Build & publish Docker image
15+
runs-on: ubuntu-latest
16+
outputs:
17+
is_prerelease: ${{ steps.meta.outputs.is_prerelease }}
18+
steps:
19+
- name: Checkout the code
20+
uses: actions/checkout@v4
21+
22+
- name: Compute image tags
23+
id: meta
24+
run: |
25+
VERSION=${GITHUB_REF_NAME}
26+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
27+
if [[ "$VERSION" == *dev* ]]; then
28+
echo "moving=dev" >> "$GITHUB_OUTPUT"
29+
echo "is_prerelease=true" >> "$GITHUB_OUTPUT"
30+
else
31+
echo "moving=latest" >> "$GITHUB_OUTPUT"
32+
echo "is_prerelease=false" >> "$GITHUB_OUTPUT"
33+
fi
34+
35+
# QEMU lets the amd64 runner also build the linux/arm64 image (Apple Silicon,
36+
# ARM servers); buildx is the multi-platform builder driving it.
37+
- name: Set up QEMU
38+
uses: docker/setup-qemu-action@v3
39+
40+
- name: Set up Docker Buildx
41+
uses: docker/setup-buildx-action@v3
42+
43+
- name: Log in to DockerHub
44+
uses: docker/login-action@v3
45+
with:
46+
username: ${{ secrets.DOCKERHUB_USERNAME }}
47+
password: ${{ secrets.DOCKERHUB_API_TOKEN }}
48+
49+
- name: Build and push the multi-arch Docker image
50+
uses: docker/build-push-action@v6
51+
with:
52+
context: .
53+
file: Dockerfile
54+
platforms: linux/amd64,linux/arm64
55+
push: true
56+
tags: |
57+
flamapy/flamapy-ide:${{ steps.meta.outputs.version }}
58+
flamapy/flamapy-ide:${{ steps.meta.outputs.moving }}
59+
build-args: |
60+
VITE_GA_MEASUREMENT_ID=${{ secrets.VITE_GA_MEASUREMENT_ID }}
61+
cache-from: type=gha
62+
cache-to: type=gha,mode=max
63+
64+
github-release:
65+
name: Publish GitHub release
66+
needs: docker
67+
# Runs for every tag: real tags become full releases, .dev tags become
68+
# GitHub pre-releases (see prerelease/make_latest below).
69+
runs-on: ubuntu-latest
70+
# The repo's default GITHUB_TOKEN is read-only; creating a release needs write.
71+
permissions:
72+
contents: write
73+
steps:
74+
- name: Checkout git repo
75+
uses: actions/checkout@v4
76+
with:
77+
# changelog-action diffs against the previous tag, so it needs full history.
78+
fetch-depth: 0
79+
80+
- name: Generate changelog
81+
id: changelog
82+
continue-on-error: true
83+
uses: Requarks/changelog-action@v1
84+
with:
85+
token: ${{ secrets.GITHUB_TOKEN }}
86+
tag: ${{ github.ref_name }}
87+
writeToFile: 'false'
88+
89+
- name: Publish release github
90+
uses: softprops/action-gh-release@v2
91+
with:
92+
token: ${{ secrets.GITHUB_TOKEN }}
93+
tag_name: ${{ github.ref_name }}
94+
name: ${{ github.ref_name }}
95+
# Fall back to GitHub's auto-generated notes if the changelog step failed.
96+
body: ${{ steps.changelog.outputs.changes }}
97+
generate_release_notes: ${{ steps.changelog.outcome != 'success' }}
98+
# .dev tags publish as pre-releases and never become the "latest" release.
99+
prerelease: ${{ needs.docker.outputs.is_prerelease == 'true' }}
100+
make_latest: ${{ needs.docker.outputs.is_prerelease == 'false' }}
101+
102+
deploy-render:
103+
name: Trigger Render deploy
104+
needs: docker
105+
if: needs.docker.outputs.is_prerelease == 'false'
106+
runs-on: ubuntu-latest
107+
steps:
108+
- name: Deploy
109+
env:
110+
deploy_url: ${{ secrets.RENDER_DEPLOY_HOOK_URL }}
111+
run: curl "$deploy_url"

.github/workflows/update-flamapy-wheels.yml

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

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ dist-ssr
2323
*.sln
2424
*.sw?
2525
.venv
26+
__pycache__/
2627
*/__pycache__
2728
*/*/__pycache__
29+
.pytest_cache/
2830

2931
env/
3032

@@ -46,4 +48,9 @@ start_coding.sh
4648
# PyPI/release-bundle source, so they MUST stay tracked.
4749
public/flamapy/*.whl
4850
!public/flamapy/flamapy_configurator-*.whl
49-
!public/flamapy/z3_solver-*.whl
51+
!public/flamapy/z3_solver-*.whl
52+
53+
# The served manifest carries versioned wheel filenames, so it too is a build
54+
# artifact: `make build-wheels` generates it from the tracked, version-less
55+
# plugins.conf.template.json. Only the template is committed.
56+
public/flamapy/plugins.conf.json

0 commit comments

Comments
 (0)