Skip to content

Commit 2514822

Browse files
committed
CI: add macos, add release workflow
1 parent b9301e4 commit 2514822

File tree

3 files changed

+64
-40
lines changed

3 files changed

+64
-40
lines changed

.github/workflows/debian-build.yml

-35
This file was deleted.

.github/workflows/unix-build.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Unix Build
2+
3+
env:
4+
artifacts: |
5+
me7sum
6+
ME7Check_linux
7+
README.md
8+
9+
on:
10+
push:
11+
# branches: [ master ]
12+
pull_request:
13+
branches: [ master ]
14+
15+
jobs:
16+
build:
17+
strategy:
18+
matrix:
19+
os: [ 'ubuntu', 'macos']
20+
21+
runs-on: ${{ matrix.os }}-latest
22+
23+
steps:
24+
- name: install libgmp-dev
25+
if: ${{ matrix.os == 'linux' }}
26+
run: |
27+
sudo apt-get update
28+
sudo apt-get install -y libgmp-dev
29+
- uses: actions/checkout@v4
30+
- name: make
31+
run: make
32+
- name: make test
33+
run: make test
34+
- uses: rlespinasse/github-slug-action@v4
35+
if: ${{ github.event_name != 'release' }}
36+
with:
37+
short-length: 6
38+
- uses: actions/upload-artifact@v4
39+
if: ${{ github.event_name != 'release' }}
40+
with:
41+
name: me7sum-${{ env.GITHUB_SHA_SHORT }}-${{ matrix.os }}
42+
path: ${{ env.artifacts }}
43+
- name: Upload ${{ matrix.os }} Artifact to Release
44+
if: github.event_name == 'release' && github.event.action == 'created'
45+
run: |
46+
zip -qr trim-heatmap-${{ github.ref_name }}-${{ matrix.os }}.zip ${{ env.artifacts }}
47+
gh release upload ${{ github.ref_name }} me7sum-${{ github.ref_name }}-${{ matrix.os }}.zip
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/windows-build.yml

+15-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
name: Windows Build
22

3+
env:
4+
artifacts: |
5+
me7sum.exe
6+
ME7Check.exe
7+
README.md
8+
39
on:
410
push:
5-
branches: [ master ]
11+
# branches: [ master ]
612
pull_request:
713
branches: [ master ]
814

@@ -26,7 +32,11 @@ jobs:
2632
if: ${{ github.event_name != 'release' }}
2733
with:
2834
name: me7sum-${{ env.GITHUB_SHA_SHORT }}-win
29-
path: |
30-
me7sum.exe
31-
ME7Check.exe
32-
README.md
35+
path: ${{ env.artifacts }}
36+
- name: Upload Windows Artifact to Release
37+
if: github.event_name == 'release' && github.event.action == 'created'
38+
run: |
39+
zip -qr trim-heatmap-${{ github.ref_name }}-win.zip ${{ env.artifacts }}
40+
gh release upload ${{ github.ref_name }} me7sum-${{ github.ref_name }}-win.zip
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)