-
Notifications
You must be signed in to change notification settings - Fork 45
61 lines (60 loc) · 2.13 KB
/
make-binary.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
on:
workflow_call:
inputs:
linux-bin-path:
required: true
type: string
darwin-bin-path:
required: true
type: string
jobs:
make-binary:
strategy:
matrix:
os: [ubuntu-20.04, macos-12]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: 'Install Linux dependencies'
if: matrix.os == 'ubuntu-20.04'
run: |
sudo apt update
sudo apt install -y build-essential squashfs-tools curl gcc make bison
- name: 'Install MacOs dependencies'
if: matrix.os == 'macos-12'
run: |
brew install squashfs
- uses: actions/checkout@v2
- name: 'Set up Ruby'
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0.3'
- name: 'Create Linux Bin'
if: matrix.os == 'ubuntu-20.04'
run: |
wget https://github.com/pmq20/ruby-packer/releases/download/linux-x64/rubyc
chmod +x ./rubyc
./rubyc --openssl-dir=/etc/ssl ./uffizzi --output=${{ inputs.linux-bin-path }}
- name: 'Create Darwin Bin'
if: matrix.os == 'macos-12'
run: |
export PATH="$(brew --prefix)/opt/[email protected]/bin:$PATH"
export LDFLAGS="-L$(brew --prefix)/opt/[email protected]/lib"
export CPPFLAGS="-I$(brew --prefix)/opt/[email protected]/include"
export PKG_CONFIG_PATH="$(brew --prefix)/opt/[email protected]/lib/pkgconfig"
export SSL_CERT_FILE=$(ruby -e "require 'openssl'; puts OpenSSL::X509::DEFAULT_CERT_FILE")
wget https://github.com/pmq20/ruby-packer/releases/download/darwin-x64/rubyc
chmod +x ./rubyc
./rubyc --openssl-dir=/etc/ssl ./uffizzi --output=${{ inputs.darwin-bin-path }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-20.04'
with:
name: ${{ inputs.linux-bin-path }}
path: ${{ inputs.linux-bin-path }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
if: matrix.os == 'macos-12'
with:
name: ${{ inputs.darwin-bin-path }}
path: ${{ inputs.darwin-bin-path }}