-
-
Notifications
You must be signed in to change notification settings - Fork 5
96 lines (82 loc) · 2.62 KB
/
continuous-delivery.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
name: Continuous Delivery / Binaries
permissions:
contents: write
on:
release:
types: [published]
env:
CARGO_INCREMENTAL: 0
CARGO_NET_GIT_FETCH_WITH_CLI: true
CARGO_NET_RETRY: 10
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUSTFLAGS: -D warnings
RUSTUP_MAX_RETRIES: 10
defaults:
run:
shell: bash
jobs:
upload-assets:
name: ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: aarch64-unknown-linux-gnu
os: ubuntu-22.04
- target: aarch64-unknown-linux-musl
os: ubuntu-22.04
# - target: aarch64-apple-darwin
# os: macos-12
# - target: aarch64-pc-windows-msvc
# os: windows-2022
- target: x86_64-unknown-linux-gnu
os: ubuntu-22.04
- target: x86_64-unknown-linux-musl
os: ubuntu-22.04
- target: x86_64-apple-darwin
os: macos-12
# - target: x86_64-pc-windows-msvc
# os: windows-2022
# - target: x86_64-unknown-freebsd
# os: ubuntu-22.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
# - name: Install dependencies on Linux
# if: contains(matrix.os, 'freebsd')
# run: |
# sudo apt-get update
# sudo apt-get install -y libpq-dev libsqlite3-dev
# - name: Install dependencies on macOS
# if: startsWith(matrix.os, 'macos')
# run: |
# brew update
# brew install libpq sqlite3
# - name: Install dependencies on Windows
# if: startsWith(matrix.os, 'windows')
# run: |
# choco install postgresql libsqlite3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target }}
if: startsWith(matrix.os, 'ubuntu') && !contains(matrix.target, '-musl')
- uses: taiki-e/install-action@cross
if: contains(matrix.target, '-musl')
- run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >> "${GITHUB_ENV}"
if: endsWith(matrix.target, 'windows-msvc')
- run: |
echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> $GITHUB_ENV
vcpkg install openssl:x64-windows-static-md
if: startsWith(matrix.os, 'windows')
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: autopulse
target: ${{ matrix.target }}
tar: all
zip: windows
features: vendored
token: ${{ secrets.GITHUB_TOKEN }}