-
Notifications
You must be signed in to change notification settings - Fork 9
85 lines (74 loc) · 2.2 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
name: Build and Package
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Triggers the workflow on push or pull request events but only for the develop branch
# push:
# branches: [ develop ]
# pull_request:
# branches: [ develop ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-20.04
name: Linux-x64
- os: macos-11
name: MacOS-x64
steps:
# ==== OS Specific Dependencies ====
- name: Linux Depends
if: matrix.name == 'Linux-x64'
# For Windows crossbuild
# Use "x64" for 64 bit (x86_64-w64-mingw32-gcc), "x86" for 32 bit (i686-w64-mingw32-gcc)
uses: egor-tensin/setup-mingw@v2
with:
platform: x64
# ==== Build Steps ====
- name: Check out repo
uses: actions/checkout@v2
with:
path: romusage-root
submodules: false
# ==== Builds ====
- name: Build MacOS
if: (matrix.name == 'MacOS-x64')
shell: bash
run: |
cd romusage-root
make macoszip
cd ..
- name: Build Linux
if: (matrix.name == 'Linux-x64')
shell: bash
run: |
cd romusage-root
make package
cd ..
# ==== Packaging ====
- name: Package build Linux/MacOS
if: (matrix.name == 'Linux-x64') || (matrix.name == 'MacOS-x64')
shell: bash
run: |
cd romusage-root
ls -la package
# 7z a package.zip package/*
cd ..
- name: Store build
if: (matrix.name == 'Linux-x64')
uses: actions/upload-artifact@v2
with:
name: Romusage build Linux & Windows
# path: romusage-root/package/${{ env.BUILD_PACKAGE_FILENAME }}
path: romusage-root/package
# retention-days: 30
- name: Store build
if: (matrix.name == 'MacOS-x64')
uses: actions/upload-artifact@v2
with:
name: Romusage build MacOS
# path: romusage-root/package/${{ env.BUILD_PACKAGE_FILENAME }}
path: romusage-root/package
# retention-days: 30