Skip to content

Feat CdsDataSourceConfig : default configuration #198

Feat CdsDataSourceConfig : default configuration

Feat CdsDataSourceConfig : default configuration #198

Workflow file for this run

name: "Analysis with SonarCloud and package for Windows, Linux, MacOS"
on:
push:
branches: [ "main" ]
permissions: # added using https://github.com/step-security/secure-repo
contents: read
jobs:
package_for_linux:
name: Package for Linux and Analyze with SonarCloud
runs-on: ubuntu-latest
environment: production
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Install JDK
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
distribution: 'temurin'
java-version: '21'
cache: "maven"
- name: Verify Java Installation
run: java -version
- name: Install Xvfb
run: sudo apt-get install -y xvfb
- name: Start Xvfb
run: |
Xvfb :99 -screen 0 1920x1080x24 &
echo "DISPLAY=:99" >> $GITHUB_ENV
- name: Compile, Test, Package, and analyze with Maven profile (Linux)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B package -P linux -f pom.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=Lob2018_SudoFX2024 -Dsonar.qualitygate.wait=true -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml
- name: Upload output folder (Linux)
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: output-folder-linux
path: output
package_for_windows:
name: Package for Windows
needs: [ package_for_linux ]
runs-on: windows-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install JDK
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
distribution: 'temurin'
java-version: '21'
cache: "maven"
- name: Verify Java Installation
run: java -version
shell: cmd
- name: Cache WiX Toolset
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: wix311.exe
key: ${{ runner.os }}-wix311
- name: Install WiX Toolset
run: |
if (!(Test-Path wix311.exe)) {
Write-Host "wix311.exe is downloaded."
$url = 'https://github.com/wixtoolset/wix3/releases/download/wix3111rtm/wix311.exe'
$output = 'wix311.exe'
Invoke-WebRequest -Uri $url -OutFile $output
Start-Process -FilePath $output -ArgumentList '/quiet' -Wait -NoNewWindow
} else {
Write-Host "wix311.exe is in the cache."
}
- name: Add WiX Toolset to PATH
run: |
$newPath = 'C:\Program Files (x86)\WiX Toolset v3.11\bin'
$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'Machine')
[Environment]::SetEnvironmentVariable('PATH', "$newPath;$currentPath", 'Machine')
- name: Compile, Test, and Package with Maven
run: mvn package -f pom.xml
- name: Upload output folder
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: output-folder-windows
path: output
package_for_macos:
name: Package for MacOS
needs: [ package_for_linux ]
runs-on: macos-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install JDK
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
distribution: 'temurin'
java-version: '21'
cache: "maven"
- name: Verify Java Installation
run: java -version
- name: Install Xvfb
run: brew install XQuartz
- name: Start Xvfb
run: |
Xvfb :99 -screen 0 1920x1080x24 &
echo "DISPLAY=:99" >> $GITHUB_ENV
- name: Compile, Test, and Package with Maven (macOS)
run: mvn package -P mac -f pom.xml
- name: Upload output folder (macOS)
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: output-folder-macos
path: output
package_for_macos_x86_64:
name: Package for MacOS x86_64
needs: [ package_for_linux ]
runs-on: macos-13
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install JDK
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
distribution: 'temurin'
java-version: '21'
cache: "maven"
- name: Verify Java Installation
run: java -version
- name: Install Xvfb
run: brew install XQuartz
- name: Start Xvfb
run: |
Xvfb :99 -screen 0 1920x1080x24 &
echo "DISPLAY=:99" >> $GITHUB_ENV
- name: Compile, Test, and Package with Maven (macOS)
run: mvn package -P mac-x86_64 -f pom.xml
- name: Upload output folder (macOS-x86_64)
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: output-folder-macos-x86_64
path: output
publish_release:
permissions:
contents: write # for ncipollo/release-action to create a release
name: Publish the release and tag it
needs: [ package_for_windows, package_for_linux, package_for_macos, package_for_macos_x86_64 ]
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Extract version
run: echo "POM_VERSION=$(cat pom.xml | grep -oPm1 '(?<=<version>)[^<]+')" >> $GITHUB_ENV
- name: Download output folder (Windows)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: output-folder-windows
path: output
- name: Download output folder (Linux)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: output-folder-linux
path: output
- name: Download output folder (MacOS)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: output-folder-macos
path: output
- name: Download output folder (MacOS-x86_64)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: output-folder-macos-x86_64
path: output
- name: Create Release
uses: ncipollo/release-action@cdcc88a9acf3ca41c16c37bb7d21b9ad48560d87 # v1.15.0
with:
name: SudokuFX release v${{ env.POM_VERSION }}
tag: v${{ env.POM_VERSION }}
body: <br>▪ The compressed files for Windows MacOS (ZIP) and Linux (TAR) do not include the Java Runtime Environment (the latest JRE must be installed on your machine), the .bat file (for Windows) and the .sh file (for Linux and MacOS) launch the application.<br><br>▪ Both the MSI .dmg and .deb files include the Java Runtime Environment and install the application on your machine.<br><br>▪ The hash_windows.txt file, the hash_linux.txt file, and the hash_macos.txt file, contain the files fingerprints.
artifacts: 'output/*'
- name: Create Tag
run: git tag v${{ env.POM_VERSION }}
- name: Push Tag
run: git push --tags