forked from linux-minidisc/linux-minidisc
-
Notifications
You must be signed in to change notification settings - Fork 11
61 lines (59 loc) · 1.79 KB
/
Copy pathbuild.yaml
File metadata and controls
61 lines (59 loc) · 1.79 KB
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
name: Build from source
on:
push:
branches:
- master
tags:
- '**'
pull_request:
branches:
- master
jobs:
build:
runs-on: ${{ matrix.build_host }}
strategy:
fail-fast: false
matrix:
build_host:
- ubuntu-latest
build_type:
- linux
- mingw32
- mingw64
include:
- build_host: macos-latest
build_type: macos
env:
BUILD_TYPE: ${{ matrix.build_type }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Install dependencies
run: sh build/install_dependencies.sh
- name: Build (native)
if: "!contains(matrix.build_type, 'mingw')"
run: |
qmake
make
sh build/package_build.sh
- name: Build (cross-compile)
if: "contains(matrix.build_type, 'mingw')"
run: |
docker run -e BUILD_TYPE -v $(pwd):/build/ --rm linux-minidisc-mingw-docker sh build/cross_wrapper_mingw.sh sh build/cross_qmake.sh
docker run -e BUILD_TYPE -v $(pwd):/build/ --rm linux-minidisc-mingw-docker sh build/cross_wrapper_mingw.sh make
docker run -e BUILD_TYPE -v $(pwd):/build/ --rm linux-minidisc-mingw-docker sh build/cross_wrapper_mingw.sh sh build/package_build.sh
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: build-result
path: dist/*
if-no-files-found: ignore
- name: Upload release
if: startsWith(github.ref, 'refs/tags/')
run: |
gh release create "${GITHUB_REF#refs/tags/}" || true
gh release upload "${GITHUB_REF#refs/tags/}" dist/* || true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}