-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.38 KB
/
Copy pathrelease.yml
File metadata and controls
51 lines (44 loc) · 1.38 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
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: mule-linux-x86_64
compiler: g++
- os: macos-latest
artifact_name: mule-macos-x86_64
compiler: clang++
# GitHub Actions macOS-latest is currently x86_64 or arm64 depending on runner availability/choice
# but let's stick to standard runners for now. macos-13 is x86, macos-14 is arm.
- os: macos-14
artifact_name: mule-macos-arm64
compiler: clang++
steps:
- uses: actions/checkout@v3
- name: Compile Mule
run: |
mkdir -p build
if [ "${{ matrix.compiler }}" = "g++" ]; then
g++ -std=c++17 src/main.cpp src/core/*.cpp -o build/mule
else
clang++ -std=c++17 src/main.cpp src/core/*.cpp -o build/mule
fi
- name: Package
run: |
mv build/mule ${{ matrix.artifact_name }}
tar -czvf ${{ matrix.artifact_name }}.tar.gz ${{ matrix.artifact_name }}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ matrix.artifact_name }}.tar.gz