Skip to content

Commit ca665c8

Browse files
Remove need for cargo make on hosted runner.
1 parent 0b07707 commit ca665c8

File tree

6 files changed

+176
-155
lines changed

6 files changed

+176
-155
lines changed

.github/ci-build.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ if [[ "$OS_NAME" == "macOS" ]]; then
1515
echo "${archive_name}-${VERSION}-${BUILD_TRIPLET}.tar.gz" >release-archive.filename;
1616

1717
cp -r src/main/benches 'main.dist';
18-
cp Makefile.toml 'main.dist';
1918
cd 'main.dist';
2019
7z a -tzip "../$OS_NAME.zip" *;
2120
cd ..;
@@ -31,7 +30,6 @@ if [[ "$OS_NAME" == "Linux" ]]; then
3130
echo "${archive_name}-${VERSION}-${BUILD_TRIPLET}.tar.gz" >release-archive.filename;
3231

3332
cp -r src/main/benches 'target/swift_navigation_console';
34-
cp Makefile.toml 'target/swift_navigation_console';
3533
cd 'target/swift_navigation_console';
3634
7z a -tzip "../../$OS_NAME.zip" *;
3735
cd ../..;
@@ -47,8 +45,8 @@ if [[ "$OS_NAME" == "Windows" ]]; then
4745
echo "${archive_name}-${VERSION}-windows-${BUILD_TRIPLET}.exe" >release-archive.filename;
4846

4947
cp -r src/main/benches 'target/swift_navigation_console';
50-
cp Makefile.toml 'target/swift_navigation_console';
5148
cd 'target/swift_navigation_console';
49+
ls -l;
5250
7z a -tzip "../../$OS_NAME.zip" *;
5351
cd ../..;
5452
echo "${OS_NAME}.zip" >bench.filename;

.github/workflows/main.yml

Lines changed: 154 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -10,148 +10,148 @@ on:
1010

1111
jobs:
1212

13-
backend_bench:
14-
15-
name: Backend Benchmarks
16-
17-
strategy:
18-
matrix:
19-
os:
20-
- ubuntu-20.04
21-
- macos-10.15
22-
- windows-2019
23-
24-
runs-on: ${{ matrix.os }}
25-
26-
steps:
27-
28-
- name: Checkout source
29-
uses: actions/checkout@v2
30-
with:
31-
submodules: recursive
32-
ssh-key: ${{ secrets.SSH_KEY }}
33-
ssh-strict: false
34-
35-
- uses: webfactory/[email protected]
36-
with:
37-
ssh-private-key: ${{ secrets.SSH_KEY }}
38-
39-
- name: Run ssh-keyscan
40-
run: ssh-keyscan github.com >> ~/.ssh/known_hosts
41-
42-
- name: Setup SSH for Windows Git LFS
43-
run: |
44-
& "C:\\Program Files\\Git\\bin\\sh.exe" -c "ssh-keyscan github.com >> ~/.ssh/known_hosts"
45-
& "C:\\Program Files\\Git\\bin\\sh.exe" -c "echo '${{ secrets.SSH_KEY }}' >> ~/.ssh/id_rsa"
46-
if: matrix.os == 'windows-2019'
47-
48-
- name: Install ${{ runner.os }} Dependencies.
49-
shell: bash
50-
run: |
51-
if [ "$RUNNER_OS" == "Linux" ]; then
52-
sudo apt-get install -y capnproto git-lfs
53-
elif [ "$RUNNER_OS" == "macOS" ]; then
54-
brew install capnp git-lfs
55-
elif [ "$RUNNER_OS" == "Windows" ]; then
56-
choco install -y capnproto git-lfs
57-
fi
58-
59-
- name: Pull Git LFS objects
60-
run: git lfs pull
61-
env:
62-
GIT_SSH_COMMAND: ssh -o StrictHostKeyChecking=no
63-
64-
- name: Install stable Rust
65-
uses: actions-rs/toolchain@v1
66-
with:
67-
toolchain: stable
68-
override: true
69-
70-
- uses: davidB/rust-cargo-make@v1
71-
with:
72-
version: '0.32.11'
73-
74-
- uses: conda-incubator/setup-miniconda@v2
75-
with:
76-
activate-environment: console_pp
77-
environment-file: conda.yml
78-
79-
- name: Poetry Install
80-
run: |
81-
conda run -n console_pp poetry install
82-
83-
- name: Run Benchmarks
84-
shell: bash
85-
run: |
86-
cargo make benches
87-
88-
checks:
89-
90-
name: Code Quality Checks
91-
92-
runs-on: ubuntu-latest
93-
94-
steps:
95-
96-
- name: Checkout source
97-
uses: actions/checkout@v2
98-
with:
99-
submodules: recursive
100-
ssh-key: ${{ secrets.SSH_KEY }}
101-
102-
- name: Install stable Rust
103-
uses: actions-rs/toolchain@v1
104-
with:
105-
toolchain: stable
106-
override: true
107-
components: rustfmt, clippy
108-
109-
- uses: davidB/rust-cargo-make@v1
110-
with:
111-
version: '0.32.11'
112-
113-
- uses: conda-incubator/setup-miniconda@v2
114-
with:
115-
activate-environment: console_pp
116-
environment-file: conda.yml
117-
118-
- name: Install Dependencies.
119-
run: |
120-
sudo apt-get install -y capnproto
121-
122-
- name: Poetry Install
123-
run: |
124-
conda run -n console_pp poetry install
125-
126-
- name: Run Format Check
127-
run: |
128-
cargo make format-check
129-
130-
- name: Run Type Check
131-
run: |
132-
cargo make types
133-
134-
- name: Run Lint Check
135-
run: |
136-
cargo make lint
137-
138-
- name: Run Tests
139-
run: |
140-
cargo make tests
13+
# backend_bench:
14+
15+
# name: Backend Benchmarks
16+
17+
# strategy:
18+
# matrix:
19+
# os:
20+
# - ubuntu-20.04
21+
# - macos-10.15
22+
# - windows-2019
23+
24+
# runs-on: ${{ matrix.os }}
25+
26+
# steps:
27+
28+
# - name: Checkout source
29+
# uses: actions/checkout@v2
30+
# with:
31+
# submodules: recursive
32+
# ssh-key: ${{ secrets.SSH_KEY }}
33+
# ssh-strict: false
34+
35+
# - uses: webfactory/[email protected]
36+
# with:
37+
# ssh-private-key: ${{ secrets.SSH_KEY }}
38+
39+
# - name: Run ssh-keyscan
40+
# run: ssh-keyscan github.com >> ~/.ssh/known_hosts
41+
42+
# - name: Setup SSH for Windows Git LFS
43+
# run: |
44+
# & "C:\\Program Files\\Git\\bin\\sh.exe" -c "ssh-keyscan github.com >> ~/.ssh/known_hosts"
45+
# & "C:\\Program Files\\Git\\bin\\sh.exe" -c "echo '${{ secrets.SSH_KEY }}' >> ~/.ssh/id_rsa"
46+
# if: matrix.os == 'windows-2019'
47+
48+
# - name: Install ${{ runner.os }} Dependencies.
49+
# shell: bash
50+
# run: |
51+
# if [ "$RUNNER_OS" == "Linux" ]; then
52+
# sudo apt-get install -y capnproto git-lfs
53+
# elif [ "$RUNNER_OS" == "macOS" ]; then
54+
# brew install capnp git-lfs
55+
# elif [ "$RUNNER_OS" == "Windows" ]; then
56+
# choco install -y capnproto git-lfs
57+
# fi
58+
59+
# - name: Pull Git LFS objects
60+
# run: git lfs pull
61+
# env:
62+
# GIT_SSH_COMMAND: ssh -o StrictHostKeyChecking=no
63+
64+
# - name: Install stable Rust
65+
# uses: actions-rs/toolchain@v1
66+
# with:
67+
# toolchain: stable
68+
# override: true
69+
70+
# - uses: davidB/rust-cargo-make@v1
71+
# with:
72+
# version: '0.32.11'
73+
74+
# - uses: conda-incubator/setup-miniconda@v2
75+
# with:
76+
# activate-environment: console_pp
77+
# environment-file: conda.yml
78+
79+
# - name: Poetry Install
80+
# run: |
81+
# conda run -n console_pp poetry install
82+
83+
# - name: Run Benchmarks
84+
# shell: bash
85+
# run: |
86+
# cargo make benches
87+
88+
# checks:
89+
90+
# name: Code Quality Checks
91+
92+
# runs-on: ubuntu-latest
93+
94+
# steps:
95+
96+
# - name: Checkout source
97+
# uses: actions/checkout@v2
98+
# with:
99+
# submodules: recursive
100+
# ssh-key: ${{ secrets.SSH_KEY }}
101+
102+
# - name: Install stable Rust
103+
# uses: actions-rs/toolchain@v1
104+
# with:
105+
# toolchain: stable
106+
# override: true
107+
# components: rustfmt, clippy
108+
109+
# - uses: davidB/rust-cargo-make@v1
110+
# with:
111+
# version: '0.32.11'
112+
113+
# - uses: conda-incubator/setup-miniconda@v2
114+
# with:
115+
# activate-environment: console_pp
116+
# environment-file: conda.yml
117+
118+
# - name: Install Dependencies.
119+
# run: |
120+
# sudo apt-get install -y capnproto
121+
122+
# - name: Poetry Install
123+
# run: |
124+
# conda run -n console_pp poetry install
125+
126+
# - name: Run Format Check
127+
# run: |
128+
# cargo make format-check
129+
130+
# - name: Run Type Check
131+
# run: |
132+
# cargo make types
133+
134+
# - name: Run Lint Check
135+
# run: |
136+
# cargo make lint
137+
138+
# - name: Run Tests
139+
# run: |
140+
# cargo make tests
141141

142142
build:
143143

144144
name: Build Binaries
145145

146-
needs:
147-
- checks
148-
- backend_bench
146+
# needs:
147+
# - checks
148+
# - backend_bench
149149

150150
strategy:
151151
matrix:
152152
os:
153-
- ubuntu-20.04
154-
- macos-10.15
153+
# - ubuntu-20.04
154+
# - macos-10.15
155155
- windows-2019
156156

157157
runs-on: ${{ matrix.os }}
@@ -202,6 +202,16 @@ jobs:
202202
shell: bash
203203
run: |
204204
cargo make prod-installer
205+
206+
- name: Find pyd.
207+
run: |
208+
Get-ChildItem -Filter *.pyd -Recurse /
209+
210+
- name: Zip ${{ runner.os }} Binaries.
211+
env:
212+
OS_NAME: ${{ runner.os }}
213+
shell: bash
214+
run: |
205215
bash ./.github/ci-build.sh
206216
echo "RELEASE_ARCHIVE=$(cat release-archive.filename)" >>$GITHUB_ENV
207217
echo "BENCH_ARCHIVE=$(cat bench.filename)" >>$GITHUB_ENV
@@ -236,9 +246,17 @@ jobs:
236246
name: ${{ runner.os }}-artifacts-bench
237247
path: |
238248
output
239-
- name: Extract zip and run bench.
249+
- name: Extract binary and data.
240250
run: |
241251
cd output
242252
7z x $(cat bench.filename) -aoa -o${{ runner.os }}
243-
cd ${{ runner.os }}
244-
cargo make frontend-bench
253+
254+
- name: Run Frontend Benchmark.
255+
shell: bash
256+
run: |
257+
cd output/${{ runner.os }}
258+
if [ "$RUNNER_OS" == "Windows" ]; then
259+
python benches/frontend_bench.py --binary=swift_navigation_console.exe
260+
else
261+
python benches/frontend_bench.py --binary=swift_navigation_console
262+
fi

0 commit comments

Comments
 (0)