Skip to content

Commit

Permalink
[GHA] Refactored every worflow files
Browse files Browse the repository at this point in the history
Did split them in small file easier to navigate in and develop per task
Naming is <triggerable>-<parentMainWorflowStep>-<subID>.yml
- If the worflow is triggerable (manually or automatically), it'll be called , else
- parentMainWorflowStep without subID are generally used to organise steps on named step
  • Loading branch information
RoiArthurB committed Feb 21, 2024
1 parent a368f08 commit 6d89dba
Show file tree
Hide file tree
Showing 17 changed files with 857 additions and 265 deletions.
189 changes: 0 additions & 189 deletions .github/workflows/publish-to-third-party.yml

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,12 @@ jobs:
env:
GAMA_KEYSTORE_BASE64: ${{ secrets.GAMA_KEYSTORE_BASE64 }}
GAMA_STORE: ${{ secrets.GAMA_KEYSTORE_STOREPASS }}

- name: Tag release version
if: "${{ inputs.get_all_archives_for_release }}"
run: |
echo "Rename mvn config file"
echo "Tag latest commit with release"


#
# ██████╗ ██╗ ██╗██╗██╗ ██████╗ ██╗███╗ ██╗ ██████╗
Expand Down
93 changes: 93 additions & 0 deletions .github/workflows/travis-packaging-jdk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Testing Maven Build

on:
workflow_call:
inputs:
RELEASE_VERSION:
required: true
default: 2024.03.0
type: string
secrets:
GAMA_KEYSTORE_BASE64:
required: true
GAMA_KEYSTORE_STOREPASS:
required: true

jobs:
add-jdk:
runs-on: ubuntu-latest
steps:

- name: Get linux testing releases
uses: actions/download-artifact@v4
with:
name: gama-compiled-archive

- name: Get linux testing releases
uses: actions/download-artifact@v4
with:
name: travis-scripts
path: ${{ github.workspace }}/travis

- name: Convert maven tarball to zip archives
shell: bash
run: |
# Convert to zip archives
find . -name "gama.application-*.tar.gz" -print -exec bash -c 'tar xzf {} && zip -9 -r -q $(basename \{} .tar.gz).zip $(tar --exclude="*/*" -tf {}) && rm -fr $(tar tf {}) {} && echo "Compressed and convert {} to zip"' \;
- name: Make zip file
shell: bash
run: |
touch $GITHUB_WORKSPACE/sign.maven
echo "$GAMA_KEYSTORE_BASE64" | base64 --decode > ~/gama.keystore
$GITHUB_WORKSPACE/travis/zip_withjdk.sh
env:
GAMA_KEYSTORE_BASE64: ${{ secrets.GAMA_KEYSTORE_BASE64 }}
GAMA_KEYSTORE_STOREPASS: ${{ secrets.GAMA_KEYSTORE_STOREPASS }}
RUNNER_TMP: ${{ runner.temp }}

# cf https://github.com/actions/upload-artifact/issues/246
- name: Move artefacts to root tree
run: |
# MacOS Family
mv ${{ github.workspace }}/travis/mac-sign.sh ${{ github.workspace }}
mv ${{ github.workspace }}/travis/what2sign.sh ${{ github.workspace }}
mv ${{ github.workspace }}/travis/extraresources/entitlements.plist ${{ github.workspace }}
# Windows Family
mv ${{ github.workspace }}/travis/extraresources/installer/windows/* ${{ github.workspace }}
# Debian Family
mv gama.application-linux.gtk.x86_64.zip gama-platform_${{ inputs.RELEASE_VERSION }}-1_amd64.zip
mv gama.application-linux.gtk.x86_64_withJDK.zip gama-platform-jdk_${{ inputs.RELEASE_VERSION }}-1_amd64.zip
cd ${{ github.workspace }}/travis/extraresources/installer/unix && zip -r ${{ github.workspace }}/extraresources-unix.zip .
- uses: actions/upload-artifact@v4
with:
name: gama-mac-unsigned
path: |
./gama.application-macosx*zip
./mac-sign.sh
./what2sign.sh
./entitlements.plist
- uses: actions/upload-artifact@v4
with:
name: gama-linux
path: |
./gama-platform*amd64.zip
./extraresources-unix.zip
- uses: actions/upload-artifact@v4
with:
name: gama-windows
path: |
./gama.application-win32*zip
./icon256.ico
./windows_installer_script.iss
./LICENSE
- uses: actions/upload-artifact@v4
with:
name: gama-zip-builds
path: |
./gama.application-win32*zip
./gama-platform*amd64.zip
38 changes: 38 additions & 0 deletions .github/workflows/travis-packaging-linux-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Testing linux package

on:
workflow_call:
inputs:
RELEASE_VERSION:
required: true
default: 2024.03.0
type: string

jobs:
debian-test-installer:
runs-on: ubuntu-latest
steps:
# Get Linux deb archive
- uses: actions/download-artifact@v4
with:
name: gama-linux-deb

- name: Update apt databse
run: |
sudo apt update
- name: Install, Run & Remove (w JDK)
shell: bash
run: |
sudo apt install ./gama-platform-jdk_${{ inputs.RELEASE_VERSION }}-1_amd64.deb
gama-headless -help
- name: Install, Run & Remove (w/o JDK)
shell: bash
run: |
sudo apt install -y ./gama-platform_${{ inputs.RELEASE_VERSION }}-1_amd64.deb
# Switch to OpenJDK 17
sudo update-java-alternatives -s $(update-java-alternatives -l | grep "\-openjdk" | cut -d " " -f 1)
java -version
gama-headless -help
sudo apt remove -y gama-platform
Loading

0 comments on commit 6d89dba

Please sign in to comment.