Skip to content

Commit 9b7e3f6

Browse files
Merge pull request #2546 from moosetechnology/Update-moose11
Use same workflows as M12
2 parents e6bc779 + 0773e12 commit 9b7e3f6

File tree

6 files changed

+36
-193
lines changed

6 files changed

+36
-193
lines changed

.github/workflows/continuous.yml

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

.github/workflows/get-versions.yml

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

.github/workflows/release.yml

Lines changed: 7 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,13 @@
1-
name: Stable
1+
name: Build release
22

33
on:
44
release:
55
types: [created, edited]
66

77
jobs:
8-
9-
# Read the content of the files pharo-versions.json and moose-version.json.
10-
get-versions:
11-
runs-on: ubuntu-latest
12-
outputs:
13-
versions: ${{ steps.read-file.outputs.versions }}
14-
steps:
15-
- uses: actions/checkout@v4
16-
with:
17-
ref: ${{ github.ref }}
18-
- name: Read file
19-
id: read-file
20-
run: |
21-
VERSIONS=$(cat $GITHUB_WORKSPACE/.github/workflows/versions.json)
22-
echo "versions=$VERSIONS" >> $GITHUB_OUTPUT
23-
24-
25-
build:
26-
runs-on: ubuntu-latest
27-
needs: get-versions
28-
env:
29-
PROJECT_NAME: ${{ fromJSON(needs.get-versions.outputs.versions).moose-name }}
30-
strategy:
31-
fail-fast: false
32-
matrix:
33-
smalltalk: ${{ fromJSON(needs.get-versions.outputs.versions).pharo-versions }}
34-
name: ${{ matrix.smalltalk }}
35-
steps:
36-
- uses: actions/checkout@v4
37-
with:
38-
fetch-depth: 0 # Option fetching all commits
39-
- uses: hpi-swa/setup-smalltalkCI@v1
40-
with:
41-
smalltalk-image: ${{ matrix.smalltalk }}
42-
- run: smalltalkci -s ${{ matrix.smalltalk }}
43-
shell: bash
44-
timeout-minutes: 15
45-
46-
- name: set-version
47-
run: |
48-
ls -l $SMALLTALK_CI_VM
49-
$SMALLTALK_CI_VM $SMALLTALK_CI_IMAGE eval --save "MooseVersion current commitHash: '$GITHUB_SHA'. (Smalltalk tools toolNamed: #mooseWelcome) closePharoWelcomeThenOpen"
50-
51-
- name: Package
52-
run: |
53-
mv /home/runner/.smalltalkCI/_builds/* .
54-
mv TravisCI.image $PROJECT_NAME-${{ matrix.smalltalk }}.image
55-
mv TravisCI.changes $PROJECT_NAME-${{ matrix.smalltalk }}.changes
56-
echo ${${{ matrix.smalltalk }}} | sed -e 's/.*\-//g ; s/\..*//g ; s/$/0/' > pharo.version
57-
# Remove every character before '-' ; Remove point and anything after it ; add a '0'.
58-
# This pattern transforms as follow: 'Pharo64-9.0' --> '90' and 'Pharo64-10' --> '100'.
59-
- name: Zip package
60-
run: |
61-
zip -r $PROJECT_NAME-${{ matrix.smalltalk }}.zip $PROJECT_NAME-${{ matrix.smalltalk }}.image $PROJECT_NAME-${{ matrix.smalltalk }}.changes *.sources pharo.version
62-
ls
63-
64-
- name: Update release
65-
uses: Xotl/cool-github-releases@v1
66-
with:
67-
mode: update
68-
replace_assets: true
69-
tag_name: ${{ fromJSON(needs.get-versions.outputs.versions).release-tag }}
70-
assets: ${{ env.PROJECT_NAME }}-${{ matrix.smalltalk }}.zip
71-
github_token: ${{ secrets.GITHUB_TOKEN }}
8+
run-tests-and-update-release:
9+
name: Run tests and update release
10+
uses: moosetechnology/.github/.github/workflows/test-and-release.yml@main
11+
with:
12+
pre-upload-script: "MooseVersion current commitHash: '$GITHUB_SHA'. (Smalltalk tools toolNamed: #mooseWelcome) closePharoWelcomeThenOpen"
13+
release-tag: ${{ github.ref }}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Development
2+
run-name: >-
3+
${{ vars.BRANCHES_CONFIGURATION
4+
&& fromJSON(vars.BRANCHES_CONFIGURATION)[github.ref_name]
5+
&& fromJSON(vars.BRANCHES_CONFIGURATION)[github.ref_name].run-name
6+
|| github.ref_name }} #Dedicated name in the Repository variable OR branch name
7+
8+
on:
9+
push:
10+
branches:
11+
- development
12+
- v10
13+
- v11
14+
schedule:
15+
- cron: '0 0 * * *'
16+
# Allows you to run this workflow manually from the Actions tab
17+
workflow_dispatch:
18+
19+
jobs:
20+
run-tests-and-update-release:
21+
name: Run tests and update release
22+
uses: moosetechnology/.github/.github/workflows/test-and-release.yml@main
23+
with:
24+
pre-upload-script: "MooseVersion current commitHash: '$GITHUB_SHA'. (Smalltalk tools toolNamed: #mooseWelcome) closePharoWelcomeThenOpen"

.github/workflows/test.yml

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,8 @@ on:
55
types: [assigned, opened, synchronize, reopened]
66

77
jobs:
8-
9-
# Get the content of the file versions.json. It is interpreted as a json data in the next job.
10-
get-versions:
11-
uses: ./.github/workflows/get-versions.yml
12-
with:
13-
file-path: $GITHUB_WORKSPACE/.github/workflows/versions.json
14-
15-
# Run tests on pharo versions described in the file pharo-versions.json
16-
build:
17-
runs-on: ubuntu-latest
18-
needs:
19-
- get-versions
20-
strategy:
21-
fail-fast: false
22-
matrix:
23-
smalltalk: ${{ fromJSON(needs.get-versions.outputs.versions).pharo-versions }}
24-
name: ${{ matrix.smalltalk }}
25-
steps:
26-
- uses: actions/checkout@v3
27-
with:
28-
fetch-depth: 0 # Option fetching all commits
29-
- uses: hpi-swa/setup-smalltalkCI@v1
30-
with:
31-
smalltalk-image: ${{ matrix.smalltalk }}
32-
- run: smalltalkci -s ${{ matrix.smalltalk }}
33-
shell: bash
34-
timeout-minutes: 15
8+
run:
9+
uses: moosetechnology/.github/.github/workflows/run-tests.yml@main
10+
secrets: inherit
11+
with:
12+
create-artifact: true

.github/workflows/versions.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)