-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.51 KB
/
check-build.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
name: Check Build Pull Request
on:
pull_request:
branches: [master]
workflow_dispatch:
inputs:
name:
description: "Name"
required: true
default: "check pull request"
jobs:
build:
runs-on: ubuntu-latest
name: Check Pull Request
steps:
- name: 📥 Checkout
uses: actions/checkout@v4
- name: ⚡️ Rust Cache
uses: Swatinem/rust-cache@v2
# - name: ⚡️ Shared Compilation Cache
# uses: mozilla-actions/sccache-action@v0.0.4
# with:
# version: "v0.7.4"
- name: 📦 Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake musl-dev pkg-config libpq-dev openssl libssl-dev
# - name: 📦 Install Cargo Binary install
# uses: cargo-bins/cargo-binstall@main
- name: 📦 Install cross
# run: cargo binstall --force cross -y
run: cargo install cross
- name: 🛠️ Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.76
override: true
target: x86_64-unknown-linux-musl
- name: 🚀 Build
env:
SCCACHE_GHA_ENABLED: "true"
# RUSTC_WRAPPER: "sccache"
RUSTFLAGS: "-Ctarget-features=-crt-static"
TARGET_CC: "x86_64-linux-musl-gcc"
run: |
RUSTFLAGS="-Ctarget-feature=-crt-static" TARGET_CC=x86_64-linux-musl-gcc cargo build --target x86_64-unknown-linux-musl --profile=ephemeral-build