Skip to content

Commit 30b6b3e

Browse files
committed
Release build workflow
1 parent f5befe4 commit 30b6b3e

3 files changed

Lines changed: 146 additions & 4 deletions

File tree

.github/workflows/make-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ name: Regression tests
33
on:
44
push:
55
branches: [ master ]
6-
pull_request:
7-
branches: [ master ]
6+
# pull_request:
7+
# branches: [ master ]
88

99
jobs:
10-
build:
1110

11+
build:
1212
strategy:
1313
matrix:
1414
java: [11, 21]
@@ -23,14 +23,14 @@ jobs:
2323
java-version: ${{ matrix.java }}
2424
distribution: temurin
2525
- name: make tests
26+
shell: bash
2627
working-directory: ./prism
2728
run: |
2829
make
2930
make unittests
3031
make tests
3132
3233
build-win:
33-
3434
strategy:
3535
matrix:
3636
java: [11, 21]

.github/workflows/release-win.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
# Trigger on version tags: v4.10 etc.
6+
tags:
7+
- 'v*'
8+
# TEMP
9+
pull_request:
10+
branches: [ master ]
11+
# Allows manual triggering
12+
workflow_dispatch:
13+
inputs:
14+
do_publish:
15+
description: 'Actually publish to GitHub Releases?'
16+
required: true
17+
type: boolean
18+
default: false
19+
20+
jobs:
21+
22+
build:
23+
strategy:
24+
matrix:
25+
include:
26+
- os: windows-latest
27+
artifact_name: prism-win64
28+
runs-on: ${{ matrix.os }}
29+
30+
steps:
31+
- run: git config --global core.autocrlf input
32+
- uses: actions/checkout@v4
33+
- name: Set up JDK
34+
uses: actions/setup-java@v4
35+
with:
36+
java-version: '17'
37+
distribution: 'temurin'
38+
- name: Install Cygwin Dependencies
39+
uses: cygwin/cygwin-install-action@v4
40+
with:
41+
packages: |
42+
make,
43+
mingw64-x86_64-gcc-g++,
44+
binutils,
45+
dos2unix,
46+
wget,
47+
unzip,
48+
python
49+
- name: Build
50+
shell: bash
51+
env:
52+
CYGWIN: winsymlinks:native
53+
working-directory: ./prism
54+
run: >-
55+
echo "C:\Program Files (x86)\NSIS" >> $GITHUB_PATH &&
56+
echo "C:/Program Files (x86)/NSIS" >> $GITHUB_PATH &&
57+
echo $GITHUB_PATH &&
58+
find "C:/Program*" &&
59+
make release
60+
- name: Upload artifact
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: ${{ matrix.artifact_name }}
64+
path: prism/release/*.exe
65+

.github/workflows/release.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
# Trigger on version tags: v4.10 etc.
6+
tags:
7+
- 'v*'
8+
# TEMP
9+
pull_r# equest:
10+
# branches: [ master ]
11+
# Allows manual triggering
12+
workflow_dispatch:
13+
inputs:
14+
do_publish:
15+
description: 'Actually publish to GitHub Releases?'
16+
required: true
17+
type: boolean
18+
default: false
19+
20+
jobs:
21+
22+
build:
23+
strategy:
24+
matrix:
25+
include:
26+
- os: ubuntu-latest
27+
artifact_name: prism-linux64
28+
# - os: macos-latest
29+
# artifact_name: prism-macos64
30+
runs-on: ${{ matrix.os }}
31+
32+
steps:
33+
- uses: actions/checkout@v4
34+
- name: Set up JDK
35+
uses: actions/setup-java@v4
36+
with:
37+
java-version: '17'
38+
distribution: 'temurin'
39+
- name: Build
40+
shell: bash
41+
working-directory: ./prism
42+
run: |
43+
make release
44+
- name: Upload artifact
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: ${{ matrix.artifact_name }}
48+
path: prism/release/*.tar.gz
49+
50+
test_release:
51+
needs: build
52+
strategy:
53+
matrix:
54+
include:
55+
- os: ubuntu-latest
56+
artifact: prism-linux64
57+
# - os: macos-latest
58+
# artifact: prism-macos64
59+
runs-on: ${{ matrix.os }}
60+
61+
steps:
62+
- name: Download Artifact
63+
uses: actions/download-artifact@v4
64+
with:
65+
name: ${{ matrix.artifact }}
66+
path: test-dir
67+
- name: Verify download
68+
run: ls -R test-dir/
69+
- name: Build and run smoke test
70+
shell: bash
71+
working-directory: ./test-dir
72+
run: |
73+
tar -xzf prism*.tar.gz
74+
rm prism*.tar.gz
75+
cd prism-*
76+
./install.sh
77+
etc/tests/run.sh

0 commit comments

Comments
 (0)