Skip to content

Commit d84d69a

Browse files
Vendored Openssl (#87)
This PR looks to build Foreman with a vendored openssl
1 parent f5dde74 commit d84d69a

File tree

9 files changed

+247
-194
lines changed

9 files changed

+247
-194
lines changed

.github/workflows/ci.yml

Lines changed: 74 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -3,106 +3,108 @@ name: CI
33
on:
44
push:
55
branches:
6-
- main
6+
- main
77

88
pull_request:
99
branches:
10-
- main
10+
- main
1111

1212
jobs:
1313
checks:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v2
1818

19-
- name: Setup Rust toolchain
20-
shell: bash
21-
run: rustup default stable
19+
- name: Setup Rust toolchain
20+
shell: bash
21+
run: rustup default stable
2222

23-
- name: Rustfmt
24-
shell: bash
25-
run: cargo fmt -- --check
23+
- name: Rustfmt
24+
shell: bash
25+
run: cargo fmt -- --check
2626

27-
- name: Clippy
28-
shell: bash
29-
run: cargo clippy
27+
- name: Clippy
28+
shell: bash
29+
run: cargo clippy
3030

3131
build:
3232
needs: checks
33-
timeout-minutes: 15
33+
timeout-minutes: 20
3434
strategy:
3535
matrix:
36-
os: [windows-latest, ubuntu-latest]
37-
rust_version: [stable, "1.66.0"]
36+
os: [windows-latest, ubuntu-latest]
37+
rust_version: [stable, "1.66.0"]
3838

39-
runs-on: ${{ matrix.os }}
39+
runs-on: ${{ matrix.os }}
4040
steps:
41-
- uses: actions/checkout@v2
42-
43-
- name: Setup Rust toolchain
44-
shell: bash
45-
run: rustup default ${{ matrix.rust_version }}
41+
- uses: actions/checkout@v2
4642

47-
- name: Build
48-
shell: bash
49-
run: cargo build --locked --verbose
43+
- name: Setup Rust toolchain
44+
run: rustup default ${{ matrix.rust_version }}
5045

51-
- name: Run tests
52-
shell: bash
53-
run: cargo test --locked --verbose
46+
- name: Build
47+
run: cargo build --locked --verbose
5448

55-
end-to-end-tests:
56-
strategy:
57-
matrix:
58-
os: [ubuntu-latest, windows-latest]
49+
- name: Run tests
50+
run: cargo test --locked --verbose
5951

60-
runs-on: ${{ matrix.os }}
52+
end-to-end-tests-ubuntu:
53+
runs-on: ubuntu-latest
6154
needs: build
62-
6355
steps:
64-
- uses: actions/checkout@v2
65-
66-
- name: End-to-end tests
67-
shell: bash
68-
run: |
69-
cargo install --path .
70-
foreman --version
71-
PATH=$PATH:~/.foreman/bin
72-
./scripts/end-to-end-tests.sh
73-
74-
kill-process-test-unix:
75-
strategy:
76-
matrix:
77-
os: [ubuntu-latest]
78-
79-
runs-on: ${{ matrix.os }}
56+
- uses: actions/checkout@v2
57+
58+
- name: End-to-end tests ubuntu
59+
shell: bash
60+
run: |
61+
cargo install --path .
62+
foreman --version
63+
PATH=$PATH:~/.foreman/bin
64+
./scripts/end-to-end-tests.sh
65+
66+
end-to-end-tests-windows:
67+
runs-on: windows-latest
8068
needs: build
8169
steps:
82-
- uses: actions/checkout@v2
83-
84-
- name: kill-process-test-unix
85-
shell: bash
86-
run: |
87-
cargo install --path .
88-
foreman --version
89-
PATH=$PATH:~/.foreman/bin
90-
./scripts/kill-process-test-unix.sh
91-
92-
kill-process-test-windows:
93-
strategy:
94-
matrix:
95-
os: [windows-latest]
96-
runs-on: ${{ matrix.os }}
70+
- uses: actions/checkout@v2
71+
72+
- name: install foreman from source
73+
shell: pwsh
74+
run: |
75+
cargo install --path .
76+
foreman --version
77+
78+
- name: End-to-end tests windows
79+
shell: bash
80+
run: |
81+
PATH=$PATH:~/.foreman/bin
82+
./scripts/end-to-end-tests.sh
83+
84+
kill-process-test-unix:
85+
runs-on: ubuntu-latest
9786
needs: build
9887
steps:
99-
- uses: actions/checkout@v2
88+
- uses: actions/checkout@v2
10089

101-
- name: kill-process-test-windows
102-
shell: pwsh
103-
run: |
104-
cargo install --path .
105-
foreman --version
106-
$env:Path += '%USERPROFILE%/.foreman/bin'
107-
.\scripts\kill-process-test-windows.ps1
90+
- name: kill-process-test-unix
91+
shell: bash
92+
run: |
93+
cargo install --path .
94+
foreman --version
95+
PATH=$PATH:~/.foreman/bin
96+
./scripts/kill-process-test-unix.sh
10897
98+
kill-process-test-windows:
99+
runs-on: windows-latest
100+
needs: build
101+
steps:
102+
- uses: actions/checkout@v2
103+
104+
- name: kill-process-test-windows
105+
shell: pwsh
106+
run: |
107+
cargo install --path .
108+
foreman --version
109+
$env:Path += '%USERPROFILE%/.foreman/bin'
110+
.\scripts\kill-process-test-windows.ps1

.github/workflows/openssl.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
3+
set -x
4+
set -e
5+
6+
OPENSSL_VER=${OPENSSL_VER:-openssl-1.1.1n}
7+
OPENSSL_DST=${PWD}/${OPENSSL_VER}-install
8+
9+
if [[ ! -d ${OPENSSL_DST} ]]; then
10+
curl -O https://www.openssl.org/source/${OPENSSL_VER}.tar.gz
11+
tar xzf ${OPENSSL_VER}.tar.gz
12+
cd ${OPENSSL_VER}
13+
./Configure no-shared enable-rc5 zlib darwin64-arm64-cc --prefix=${OPENSSL_DST} --openssldir=${OPENSSL_DST}
14+
make -j2
15+
make install
16+
cd -
17+
fi
18+
19+
export OPENSSL_DIR=${OPENSSL_DST}

0 commit comments

Comments
 (0)