-
Notifications
You must be signed in to change notification settings - Fork 9
120 lines (115 loc) · 3.65 KB
/
go-assets.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Go Assets
on:
push:
branches:
- go_assets
pull_request:
jobs:
manylinux2014:
runs-on: ${{ matrix.runner }}
container: ${{ matrix.container }}
strategy:
matrix:
name: [ubuntu-latest, ubuntu-arm-latest]
include:
- name: ubuntu-latest
os: ubuntu-latest
release-os: manylinux2014
release-arch: x86_64
container: quay.io/pypa/manylinux2014_x86_64
runner: [ubuntu-latest]
- name: ubuntu-arm-latest
os: ubuntu-latest
release-os: manylinux2014
release-arch: aarch64
container: quay.io/pypa/manylinux2014_aarch64
runner: [self-hosted, linux, ARM64]
steps:
- uses: actions/checkout@v3
- name: Install stable rust
run: curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
- name: Install uniffi-bindgen-go
run: |
source "$HOME/.cargo/env"
cargo install uniffi-bindgen-go --git https://github.com/NordSecurity/uniffi-bindgen-go --tag v0.2.0+v0.25.0
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.21.x'
- name: Build
run: |
source "$HOME/.cargo/env"
./build_go_linux.sh
- name: Tar assets
run: tar -czvf iroh-go.tar.gz ./iroh-go/iroh
- name: Upload assets
uses: actions/upload-artifact@v3
with:
name: iroh-go-${{ matrix.release-os }}-${{ matrix.release-arch }}
path: iroh-go.tar.gz
osx:
runs-on: ${{ matrix.runner }}
strategy:
matrix:
name: [macOS-latest, macOS-arm-latest]
include:
- name: macOS-latest
python: 3.11
os: macOS-latest
release-os: darwin
release-arch: x86_64
runner: [macOS-latest]
- name: macOS-arm-latest
python: 3.11
os: macOS-latest
release-os: darwin
release-arch: aarch64
runner: [self-hosted, macOS, ARM64]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Setup Go (self-hosted)
if: startsWith(runner.name, 'hetz-')
uses: actions/setup-go@v3
with:
go-version: '1.21.x'
env:
HOME: /Users/hetzner
- name: Setup Go (gh)
if: startsWith(runner.name, 'hetz-') != true
uses: actions/setup-go@v3
with:
go-version: '1.21.x'
- name: Install uniffi-bindgen-go
run: |
export PATH=$PATH:~/.cargo/bin/
cargo install uniffi-bindgen-go --git https://github.com/NordSecurity/uniffi-bindgen-go --tag v0.2.0+v0.25.0
- name: Install uniffi-bindgen-go & Build iroh ffi
run: |
./build_go_mac.sh
- name: Tar assets
run: tar -czvf iroh-go.tar.gz ./iroh-go/iroh
- name: Upload assets
uses: actions/upload-artifact@v3
with:
name: iroh-go-${{ matrix.release-os }}-${{ matrix.release-arch }}
path: iroh-go.tar.gz
# windows:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v3
# - uses: dtolnay/rust-toolchain@stable
# - uses: actions/setup-python@v4
# with:
# python-version: '3.11'
# - name: Install maturin & uniffi-bindgen
# run: |
# pip install maturin uniffi-bindgen
# - name: Build wheel
# run: |
# maturin build --release
# - name: Upload wheel
# uses: actions/upload-artifact@v3
# with:
# name: wheels-windows-x86_64
# path: target/wheels/*.whl