Skip to content

Commit a368f08

Browse files
committed
A new start
0 parents  commit a368f08

File tree

5,891 files changed

+978216
-0
lines changed

Some content is hidden

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

5,891 files changed

+978216
-0
lines changed

.github/CONTRIBUTING.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## How to contribute to GAMA
2+
3+
#### **Did you write a patch that fixes a bug or adds a new feature?**
4+
5+
* Open a new GitHub pull request with the patch if you think your addition is worth being included in the release.
6+
7+
* Ensure the PR description clearly describes the problem and solution or the new addition. Include the relevant issue number if applicable.
8+
9+
#### **Do you intend to add a new feature or change an existing one?**
10+
11+
* Suggest your change in the [gama-dev mailing list](https://groups.google.com/forum/#!forum/gama-dev) and start writing code.
12+
13+
* Do not open an issue on GitHub until you have collected positive feedback about the change. GitHub issues are primarily intended for bug reports and fixes.
14+
15+
<br/>
16+
17+
18+
Thanks!
19+
20+
GAMA Team

.github/ISSUE_TEMPLATE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
### Steps to reproduce
3+
1.
4+
5+
2.
6+
7+
3.
8+
9+
### Expected behavior
10+
Tell us what should happen (include all relevant expectations)
11+
12+
### Actual behavior
13+
Tell us what happens instead (include relevant information, like logs, snapshots, etc.)
14+
15+
### System and version
16+
Which version of GAMA, JDK, OS ... (if necessary, copy Help>Installation Details>Configuration in GAMA)
17+

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Report a problem in using GAMA
3+
about: Create a report to help us eliminate it. Search the repository first to make sure this is a new problem and remember, the more information you provide, the more likely we are to find a fix!
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. macOS High Sierra]
28+
- PC Model: [if applicable, can be useful for displays, OpenGL problems)]
29+
- GAMA version: [e.g. git, 1.7.1, etc.]
30+
- Java version: [e.g. 1.8]
31+
- Graphics cards / Display system: [can be useful for displays, OpenGL problems]
32+
33+
**Additional context**
34+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Report a problem regarding GAMA's website and documentation
4+
url: https://github.com/gama-platform/gama-platform.github.io/issues/new/choose
5+
about: Please open issues relating to http://gama-platform.org and the online documentation in their own repository
6+
- name: Ask for support regarding your model (best practices, problem of data, ...) or how to use GAMA
7+
url: https://groups.google.com/forum/#!forum/gama-platform
8+
about: Please use the community mailing-list for support and questions related to the use of GAMA, advices and problems in your models
9+
- name: Discuss possible enhancements, shortcomings or ideas about GAMA
10+
url: https://github.com/gama-platform/gama/discussions
11+
about: Please use discussions for questions related to enhancements to GAMA, use and future of the platform before turning them into issues !
12+
- name: Thank you for your contributions !
13+
url:
14+
about: Your contributions to open source projects, large or small, make great projects like GAMA possible. Thank you for taking the time to contribute.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature or enhancement request
3+
about: Suggest an idea for improving or extending GAMA with new features. Please take the time to discuss it first in the forum or discussions if possible, as it might benefit from others users' feedbacks.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the improvement you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/SUPPORT.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Support
2+
3+
#### **Do you think you found a bug?**
4+
5+
* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/gama-platform/gama/issues).
6+
7+
* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/gama-platform/gama/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or a **test case** demonstrating the expected behavior that is not occurring.
8+
9+
#### **Do you have questions about your models?**
10+
11+
* Ask any question about how to use GAMA in the [gama-platform mailing list](https://groups.google.com/forum/#!forum/gama-platform).
12+
13+
* Consult the documentation on the [website](http://gama-platform.org) or, alternatively, on the [wiki](https://github.com/gama-platform/gama/wiki).
14+
</br>
15+
16+
17+
Thanks!
18+
19+
GAMA Team

.github/stale.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Slate bot which apply the "Slate" tag and close issue labeled "Fix to be tested"
2+
#
3+
# Full configuration documentation : https://github.com/actions/stale#all-options
4+
# =======================
5+
# Number of days of inactivity before an issue becomes stale
6+
daysUntilStale: 0
7+
# Number of days of inactivity before a stale issue is closed
8+
daysUntilClose: 7
9+
# Label to use when marking an issue as stale
10+
staleLabel: "🤖 Slate"
11+
# Issues with these labels will never be considered stale
12+
#exemptLabels:
13+
# - pinned
14+
# - security
15+
# Only issues/PRs with ANY of these labels are checked
16+
any-labels:
17+
- "👍 Fix to be tested"
18+
# Order to get issues/PRs
19+
ascending: true
20+
# Remove stale label from issues on updates/comments
21+
remove-issue-stale-when-updated: true
22+
# Remove stale label from PRs on updates/comments
23+
remove-pr-stale-when-updated: true
24+
# Dry-run
25+
operations-per-run: 0
26+
debug-only: true
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
name: Auto publish release to external stores
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
tag:
7+
description: "The tag of the release to publish"
8+
type: string
9+
required: true
10+
default: 1.9.3
11+
targets:
12+
description: "The targets to publish to separated by spaces"
13+
type: string
14+
default: "windows linux mac docker"
15+
secrets:
16+
BOT_TOKEN:
17+
required: true
18+
description: "The token used to authenticate to the Github API"
19+
20+
workflow_dispatch:
21+
inputs:
22+
tag:
23+
description: "The tag of the release to publish"
24+
type: string
25+
required: true
26+
default: 1.9.3
27+
targets:
28+
description: "The targets to publish to separated by spaces"
29+
type: string
30+
default: "windows linux mac docker"
31+
32+
33+
run-name: Auto publishing ${{ inputs.tag }} to external stores
34+
35+
jobs:
36+
get-tag-info:
37+
runs-on: ubuntu-latest
38+
name: Get tag info 🏷️
39+
40+
outputs:
41+
tag: ${{ steps.release_data.outputs.tag_name }}
42+
prerelease: ${{ steps.release_data.outputs.prerelease }}
43+
commit_hash: ${{ steps.tag_data.outputs.commit_hash }}
44+
45+
steps:
46+
- uses: actions/checkout@v4
47+
with:
48+
fetch-tags: true
49+
ref: ${{ inputs.tag }}
50+
51+
- name: Get tag data
52+
id: tag_data
53+
run: |
54+
echo "commit_hash=$(git rev-parse --short=7 HEAD)" >> "$GITHUB_OUTPUT"
55+
56+
- name: Get release data
57+
uses: cardinalby/git-get-release-action@1.2.4
58+
id: release_data
59+
env:
60+
GITHUB_TOKEN: ${{ github.token }}
61+
with:
62+
tag: ${{ inputs.tag }}
63+
64+
#
65+
# ██████╗ ███████╗██╗ ███████╗ █████╗ ███████╗███████╗
66+
# ██╔══██╗██╔════╝██║ ██╔════╝██╔══██╗██╔════╝██╔════╝
67+
# ██████╔╝█████╗ ██║ █████╗ ███████║███████╗█████╗
68+
# ██╔══██╗██╔══╝ ██║ ██╔══╝ ██╔══██║╚════██║██╔══╝
69+
# ██║ ██║███████╗███████╗███████╗██║ ██║███████║███████╗
70+
# ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝
71+
#
72+
73+
windows:
74+
needs: get-tag-info
75+
runs-on: ubuntu-latest
76+
name: Publish to windows 🪟
77+
if: contains(inputs.targets, 'windows')
78+
79+
steps:
80+
- name: Get Previous Release info
81+
# This version incementation shall be removed when winget-releaser will be able to delete older releases again cf. https://github.com/gama-platform/gama/issues/3917
82+
if: needs.get-tag-info.outputs.prerelease == 'true'
83+
id: get-prev-release
84+
run: |
85+
curl -L -G \
86+
-H "Accept: application/vnd.github+json" \
87+
-H "X-GitHub-Api-Version: 2022-11-28" \
88+
"https://api.github.com/repos/microsoft/winget-pkgs/contents/manifests/g/GamaPlatform/GamaAlpha" > ${{ runner.temp }}/prev_release.json
89+
90+
new_version_counter="$(jq -r '.[] | select(.type == "dir") | select(.name | test("^${{ inputs.tag }}-[0-9]+$")) | .name' ${{ runner.temp }}/prev_release.json | cut -d '-' -f 2 | sort -nuz | head -n1)"
91+
if [ -n "$new_version_counter" ]; then
92+
new_version_counter=$(($new_version_counter + 1))
93+
else
94+
new_version_counter=1
95+
fi
96+
echo "new_version_counter=$new_version_counter" >> $GITHUB_OUTPUT
97+
98+
- name: Publish Gama to Winget 🚀
99+
if: needs.get-tag-info.outputs.prerelease == 'false'
100+
uses: vedantmgoyal2009/winget-releaser@v2
101+
with:
102+
identifier: GamaPlatform.Gama
103+
version: ${{ inputs.tag }}
104+
release-tag: ${{ inputs.tag }}
105+
installers-regex: ^GAMA.+JDK.*\.exe$
106+
token: ${{ secrets.BOT_TOKEN }}
107+
fork-user: gama-platform
108+
109+
- name: Publish Pre release to Winget 👷
110+
if: needs.get-tag-info.outputs.prerelease == 'true'
111+
uses: vedantmgoyal2009/winget-releaser@v2
112+
with:
113+
identifier: GamaPlatform.GamaAlpha
114+
version: ${{ inputs.tag }}-${{ steps.get-prev-release.outputs.new_version_counter }}
115+
release-tag: ${{ inputs.tag }}
116+
installers-regex: ^GAMA.+JDK.*\.exe$
117+
token: ${{ secrets.BOT_TOKEN }}
118+
max-versions-to-keep: 1
119+
fork-user: gama-platform
120+
121+
- name: Get PR created for the release
122+
id: get-pr
123+
run: |
124+
curl -G \
125+
-H "Accept: application/vnd.github+json" \
126+
-H "Authorization: Bearer ${{ secrets.BOT_TOKEN }}" \
127+
-H "X-GitHub-Api-Version: 2022-11-28" \
128+
--data-urlencode "q=is:pr author:gama-bot state:open repo:microsoft/winget-pkgs sort:created-desc" \
129+
"https://api.github.com/search/issues?sort=created&order=desc&per_page=1" > ${{ runner.temp }}/pr.json
130+
131+
echo "number=$(jq -r '.items[0].number' ${{ runner.temp }}/pr.json)" >> $GITHUB_OUTPUT
132+
133+
- name: Mention developpers
134+
uses: actions/github-script@v3
135+
with:
136+
github-token: ${{secrets.BOT_TOKEN}}
137+
script: |
138+
let is_pre_release = ${{ needs.get-tag-info.outputs.prerelease }} == 'true'
139+
140+
github.issues.createComment({
141+
issue_number: ${{ steps.get-pr.outputs.number }},
142+
owner: "microsoft",
143+
repo: "winget-pkgs",
144+
body: 'Poke :point_right: @${{ github.triggering_actor }} @WoodenMaiden @lesquoyb'
145+
})
146+
147+
core.summary.
148+
addHeading(
149+
`Release ${{ inputs.tag }}${(is_pre_release)? "" : "-${{ steps.get-prev-release.outputs.new_version_counter }} alpha (with hash ${{needs.get-tag-info.outputs.commit_hash }})" } published to Winget 🚀`
150+
)
151+
.addLink("Link to the Winget PR", "https://github.com/microsoft/winget-pkgs/pull/${{ steps.get-pr.outputs.number }}")
152+
.write()
153+
154+
155+
docker:
156+
needs: get-tag-info
157+
runs-on: ubuntu-latest
158+
name: Publish pre-release as container 🐳
159+
if: needs.get-tag-info.outputs.prerelease == 'true' && contains(inputs.targets, 'docker')
160+
161+
steps:
162+
- name: Publish Gama to Github Packages 🚀
163+
run: |
164+
curl --request POST \
165+
-H "Accept: application/vnd.github+json" \
166+
-H "Authorization: token ${{ secrets.BOT_TOKEN }}" \
167+
--data '{"event_type": "automated-generation"}' \
168+
https://api.github.com/repos/gama-platform/gama.docker/dispatches
169+
170+
171+
linux-debian:
172+
needs: get-tag-info
173+
runs-on: ubuntu-latest
174+
name: Publish to PPA/Debian repo 🐧 🟠🔴
175+
if: contains(inputs.targets, 'linux')
176+
177+
steps:
178+
- name: Publish Gama to https://ppa.gama-platform.org 🚀
179+
run: |
180+
curl -L --fail-with-body \
181+
--request POST \
182+
-H "Accept: application/vnd.github+json" \
183+
-H "Authorization: token ${{ secrets.BOT_TOKEN }}" \
184+
-H "X-GitHub-Api-Version: 2022-11-28" \
185+
--data '{"ref": "main", "inputs": {"tag": "${{ inputs.tag }}"}}' \
186+
https://api.github.com/repos/gama-platform/gama.ppa/actions/workflows/69865833/dispatches
187+
188+
189+
# linux-arch:
190+
# needs: get-tag-info
191+
# runs-on: ubuntu-latest
192+
# name: Publish to AUR 🐧 🔷
193+
194+
# macos:
195+
# needs: get-tag-info
196+
# runs-on: ubuntu-latest
197+
# name: Publish to macos 🍎

.github/workflows/gama-build-test.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Testing Maven Build
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
artifact_download_id:
7+
required: false
8+
default: "gama-compiled-archive"
9+
type: string
10+
11+
jobs:
12+
compilation:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Get linux testing releases
16+
uses: actions/download-artifact@v4
17+
with:
18+
name: ${{ inputs.artifact_download_id }}
19+
20+
- name: Extract GAMA w/o JDK
21+
run: tar xvf $GITHUB_WORKSPACE/gama.application-linux.gtk.x86_64.tar.gz
22+
23+
- name: Set up Adopt OpenJDK 17
24+
uses: actions/setup-java@v4
25+
with:
26+
distribution: 'temurin'
27+
java-version: '17'
28+
java-package: jdk
29+
30+
- name: Test release
31+
run: |
32+
bash $GITHUB_WORKSPACE/headless/gama-headless.sh -m 10g -validate && \
33+
bash $GITHUB_WORKSPACE/headless/gama-headless.sh -m 10g -test && \
34+
echo "All good ! 🎉"

0 commit comments

Comments
 (0)