-
-
Notifications
You must be signed in to change notification settings - Fork 21
160 lines (128 loc) · 4.42 KB
/
release-bin.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: Release
permissions:
contents: write
on:
release:
types: [published]
jobs:
release_win64:
name: Build and release Windows 64-bit
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
cargo build --release
Compress-Archive -LiteralPath target/release/odbc2parquet.exe -DestinationPath odbc2parquet-win-x86_64.zip
- name: Github Upload
uses: svenstaro/upload-release-action@v2
with:
file: odbc2parquet-win-x86_64.zip
asset_name: odbc2parquet-win-x86_64.zip
tag: ${{ github.ref }}
release_win32:
name: Build and release Windows 32-bit
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install latest rust toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
target: i686-pc-windows-msvc
- name: Build
run: |
cargo build --release --target i686-pc-windows-msvc
Compress-Archive -LiteralPath target/i686-pc-windows-msvc/release/odbc2parquet.exe -DestinationPath odbc2parquet-win-x86.zip
- name: Github Upload
uses: svenstaro/upload-release-action@v2
with:
file: odbc2parquet-win-x86.zip
asset_name: odbc2parquet-win-x86.zip
tag: ${{ github.ref }}
release_macos_intel:
name: Build and release macOS Intel
# https://github.com/actions/runner-images?tab=readme-ov-file#available-images
runs-on: macos-13 # Intel-based macOS runner
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
cargo build --release
gzip --force target/release/odbc2parquet
mv target/release/odbc2parquet.gz odbc2parquet-macos-x86_64.gz
- name: Github Upload
uses: svenstaro/upload-release-action@v2
with:
file: odbc2parquet-macos-x86_64.gz
asset_name: odbc2parquet-macos-x86_64.gz
tag: ${{ github.ref }}
release_macos_arm64:
name: Build and release macOS ARM64
# https://github.com/actions/runner-images?tab=readme-ov-file#available-images
runs-on: macos-latest # ARM-based macOS runner (Apple Silicon)
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Unix ODBC
run: |
brew install unixodbc
- name: Build
run: |
cargo build --release
gzip --force target/release/odbc2parquet
mv target/release/odbc2parquet.gz odbc2parquet-macos-arm64.gz
- name: Github Upload
uses: svenstaro/upload-release-action@v2
with:
file: odbc2parquet-macos-arm64.gz
asset_name: odbc2parquet-macos-arm64.gz
tag: ${{ github.ref }}
release_ubuntu_x64:
name: Build and release Ubuntu x86_64
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install unixODBC
run: |
sudo apt-get update
sudo apt-get install -y unixodbc-dev
- name: Build
run: |
cargo build --release
gzip --force target/release/odbc2parquet
mv target/release/odbc2parquet.gz odbc2parquet-ubuntu-x86_64.gz
- name: Github Upload
uses: svenstaro/upload-release-action@v2
with:
file: odbc2parquet-ubuntu-x86_64.gz
asset_name: odbc2parquet-ubuntu-x86_64.gz
tag: ${{ github.ref }}
release_ubuntu_arm64:
name: Build and release Ubuntu ARM64
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install latest rust toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
target: aarch64-unknown-linux-gnu
- name: Install cross for cross-compilation
run: cargo install cross
- name: Cross-build for Ubuntu ARM (aarch64)
run: |
cross build --release --target aarch64-unknown-linux-gnu
gzip --force target/aarch64-unknown-linux-gnu/release/odbc2parquet
mv target/aarch64-unknown-linux-gnu/release/odbc2parquet.gz odbc2parquet-ubuntu-arm64.gz
- name: Github Upload
uses: svenstaro/upload-release-action@v2
with:
file: odbc2parquet-ubuntu-arm64.gz
asset_name: odbc2parquet-ubuntu-arm64.gz
tag: ${{ github.ref }}