forked from 360trev/ME7Sum
-
Notifications
You must be signed in to change notification settings - Fork 19
49 lines (46 loc) · 1.29 KB
/
unix-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
name: Unix Build
on:
push:
# branches: [ master ]
pull_request:
branches: [ master ]
release:
types: [ created ]
env:
artifacts: |
me7sum
ME7Check_linux
README.md
jobs:
build:
strategy:
matrix:
os: [ 'ubuntu', 'macos']
runs-on: ${{ matrix.os }}-latest
steps:
- name: install libgmp-dev
if: ${{ matrix.os == 'linux' }}
run: |
sudo apt-get update
sudo apt-get install -y libgmp-dev
- uses: actions/checkout@v4
- name: make
run: make
- name: make test
run: make test
- uses: rlespinasse/github-slug-action@v4
if: ${{ github.event_name != 'release' }}
with:
short-length: 6
- uses: actions/upload-artifact@v4
if: ${{ github.event_name != 'release' }}
with:
name: me7sum-${{ env.GITHUB_SHA_SHORT }}-${{ matrix.os }}
path: ${{ env.artifacts }}
- name: Upload ${{ matrix.os }} Artifact to Release
if: github.event_name == 'release' && github.event.action == 'created'
run: |
zip -qr trim-heatmap-${{ github.ref_name }}-${{ matrix.os }}.zip $(echo "${{ env.artifacts }}")
gh release upload ${{ github.ref_name }} me7sum-${{ github.ref_name }}-${{ matrix.os }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}