changes from review #253
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build z390 | |
on: [push] | |
jobs: | |
build-distribution: | |
runs-on: ubuntu-latest | |
outputs: | |
VERSION: ${{ steps.version.outputs.VERSION }} | |
steps: | |
- name: Checkout main | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: version | |
run: | | |
VERSION=$(git describe --tags) | |
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT | |
id: version | |
shell: bash | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '8' | |
- name: Build z390 distribution | |
run: bash/blddist | |
- name: Save the distribution | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: ./dist/z390_${{ steps.version.outputs.VERSION }}.zip | |
run-tests: | |
runs-on: ubuntu-latest | |
needs: build-distribution | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '8' | |
- name: get dist artefact | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
- name: Install dist and run tests | |
run: | | |
mkdir -p dist | |
unzip z390_${VERSION}.zip -d dist | |
ls -l dist/z390_${VERSION} | |
cp dist/z390_${VERSION}/z390.jar . | |
Z390_PROJECT_ROOT="../dist/z390_${VERSION}" z390test/gradlew -p z390test test | |
env: | |
VERSION: ${{ needs.build-distribution.outputs.VERSION }} | |
run-windows-demo: | |
runs-on: windows-latest | |
needs: | |
- build-distribution | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '8' | |
- name: get dist artefact | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
- name: Install dist and run demos | |
shell: cmd | |
run: | | |
tar -xf z390_%VERSION%.zip | |
dir z390_%VERSION% | |
z390_%VERSION%\bat\RUNASMDEMOS.BAT | |
z390_%VERSION%\bat\RUNCBLDEMOS.BAT | |
env: | |
VERSION: ${{ needs.build-distribution.outputs.VERSION }} | |
create-release: | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
needs: | |
- build-distribution | |
- run-tests | |
- run-windows-demo | |
steps: | |
- name: get dist artefact | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
- name: release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
z390_${{ needs.build-distribution.outputs.VERSION }}.zip |