forked from z390development/z390
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (91 loc) · 2.57 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
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