-
Notifications
You must be signed in to change notification settings - Fork 4
124 lines (107 loc) · 3.16 KB
/
main.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
name: Build and test Postgres Standard Library
on:
push:
branches:
- 1.67.1
- rust-1.69.0
- rust-1.70.0
- rust-1.71.0
pull_request:
branches:
- 1.67.1
- rust-1.69.0
- rust-1.70.0
- rust-1.71.0
jobs:
test_x86_84:
name: "x86_64 (cross: aarch64) build & test"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Install system dependencies
run: |
sudo apt-get -y update && sudo apt-get install -y \
clang-11 \
llvm-11 \
clang \
gcc \
make \
build-essential \
libz-dev \
zlib1g-dev \
strace \
libssl-dev \
pkg-config \
crossbuild-essential-arm64
- name: Install rust
run: |
export RUSTUP_HOME="$HOME/.rustup"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
cargo --version
- name: Build postgrestd for both x86_64 and aarch64
run: ./run install
env:
CARGO_TARGET_AARCH64_POSTGRES_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
CARGO_TARGET_X86_64_POSTGRES_LINUX_GNU_LINKER: cc
test_aarch64:
name: "aarch64 (cross: x86_64) build & test"
runs-on: [self-hosted, linux, ARM64, launch_template_id__lt-0a56ee65c272f154e]
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Show kernel info
run: uname -a
- name: Print env
run: env
- name: Install system dependencies
run: |
sudo apt-get -y update && sudo apt-get install -y \
clang-11 \
llvm-11 \
clang \
gcc \
make \
build-essential \
libz-dev \
zlib1g-dev \
strace \
libssl-dev \
pkg-config \
crossbuild-essential-amd64
- name: Install rust
run: |
export RUSTUP_HOME="$HOME/.rustup"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
echo "RUSTUP_HOME=$HOME/.rustup" >> $GITHUB_ENV
echo "PATH=$HOME/.cargo/bin:$PATH" >> $GITHUB_ENV
cargo --version
- name: Build postgrestd for both aarch64 and x86_64
run: ./run install
env:
CARGO_TARGET_X86_64_POSTGRES_LINUX_GNU_LINKER: x86_64-linux-gnu-gcc
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: x86_64-linux-gnu-gcc
CARGO_TARGET_AARCH64_POSTGRES_LINUX_GNU_LINKER: cc
test_macos:
name: "macos build & test (experimental)"
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Install rust
run: |
export RUSTUP_HOME="$HOME/.rustup"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
rustup toolchain install 1.71.0
cargo --version
- name: Print env
run: env
- name: Build/install both apple targets
run: ./run install