Skip to content

Commit

Permalink
Tweak actions (actix#1305)
Browse files Browse the repository at this point in the history
* Add benchmark action

* Fix Windows build
  • Loading branch information
JohnTitor authored Jan 22, 2020
1 parent 3a5b62b commit 2e9ab06
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 7 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Benchmark (Linux)

on: [push, pull_request]

jobs:
check_benchmark:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true

- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with:
command: generate-lockfile
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-build-${{ hashFiles('**/Cargo.lock') }}

- name: Check benchmark
uses: actions-rs/cargo@v1
with:
command: bench
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with:
command: update
command: generate-lockfile
- name: Cache cargo registry
uses: actions/cache@v1
with:
Expand Down
22 changes: 16 additions & 6 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: CI (Windows)
on: [push, pull_request]

env:
VCPKG_HASH: 3f62e5d55d1a7d8905df35d5c441d6e9ad64ffdf
VCPKGRS_DYNAMIC: 1

jobs:
Expand Down Expand Up @@ -30,7 +31,7 @@ jobs:
- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with:
command: update
command: generate-lockfile
- name: Cache cargo registry
uses: actions/cache@v1
with:
Expand All @@ -50,14 +51,23 @@ jobs:
uses: actions/cache@v1
id: cache-vcpkg
with:
path: C:\vcpkg
key: windows_x64-${{ matrix.version }}-vcpkg
path: vcpkg
key: windows_x64-${{ env.VCPKG_HASH }}-vcpkg

- name: Install OpenSSL
if: steps.cache-vcpkg.outputs.cache-hit != 'true'
shell: pwsh
run: |
vcpkg integrate install
vcpkg install openssl:x64-windows
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
git reset --hard $VCPKG_HASH
.\bootstrap-vcpkg.bat
.\vcpkg integrate install
.\vcpkg install openssl:x64-windows
Copy-Item .\installed\x64-windows\bin\libcrypto-1_1-x64.dll .\installed\x64-windows\bin\libcrypto.dll
Copy-Item .\installed\x64-windows\bin\libssl-1_1-x64.dll .\installed\x64-windows\bin\libssl.dll
Get-ChildItem .\installed\x64-windows\bin
Get-ChildItem .\installed\x64-windows\lib
- name: check build
uses: actions-rs/cargo@v1
Expand All @@ -76,4 +86,4 @@ jobs:
--skip=test_simple
--skip=test_expect_continue
--skip=test_http10_keepalive
--skip=test_slow_request
--skip=test_slow_request

0 comments on commit 2e9ab06

Please sign in to comment.