-
Notifications
You must be signed in to change notification settings - Fork 4
93 lines (88 loc) · 3.16 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
86
87
88
89
90
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
name: Migo HQM Server Build
env:
BIN: migo-hqm-server
jobs:
build:
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: aarch64-pc-windows-msvc
os: windows-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
- target: armv7-unknown-linux-gnueabihf
os: ubuntu-latest
- target: armv7-unknown-linux-musleabihf
os: ubuntu-latest
- target: arm-unknown-linux-gnueabihf
os: ubuntu-latest
- target: arm-unknown-linux-musleabihf
os: ubuntu-latest
- target: i686-unknown-linux-gnu
os: ubuntu-latest
- target: i686-unknown-linux-musl
os: ubuntu-latest
- target: i686-unknown-freebsd
os: ubuntu-latest
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: x86_64-unknown-freebsd
os: ubuntu-latest
- target: riscv64gc-unknown-linux-gnu
os: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
- name: Install musl-tools on Linux
run: sudo apt-get update --yes && sudo apt-get install --yes musl-tools
if: contains(matrix.platform.target, 'musl')
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: "build"
target: ${{ matrix.platform.target }}
toolchain: "stable"
args: "--locked --release"
strip: true
- run: |
7z a migo-hqm-server.zip config.ini README.md example_replay_integration.py ".\target\${{ matrix.target }}\release\migo-hqm-server.exe"
shell: bash
if: matrix.platform.os == 'windows-latest'
- name: Publish release artifacts
uses: actions/upload-artifact@v4
with:
name: migo-hqm-server-${{ matrix.target }}
path: migo-hqm-server.zip
if: matrix.platform.os == 'windows-latest'
- run: |
tar -czvf migo-hqm-server.tar.gz config.ini README.md example_replay_integration.py -C target/${{ matrix.target }}/release migo-hqm-server
shell: bash
if: matrix.platform.os != 'windows-latest'
- name: Publish release artifacts
uses: actions/upload-artifact@v4
with:
name: migo-hqm-server-${{ matrix.target }}
path: migo-hqm-server.tar.gz
if: matrix.platform.os != 'windows-latest'
- name: Publish GitHub release
uses: softprops/action-gh-release@v2
with:
files: "migo-hqm-server-*"