only cache deps

This commit is contained in:
Benjamin Fry 2019-12-15 19:08:20 -08:00
parent 845e538ebd
commit a4fc571070
4 changed files with 51 additions and 47 deletions

View File

@ -35,15 +35,14 @@ jobs:
override: true
- uses: davidB/rust-cargo-make@v1
- name: cargo target cache
- name: target/debug/deps
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
path: target/debug/deps
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }}
${{ runner.os }}-cargo-target
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
${{ runner.os }}-cargo
- name: cargo make all-features
run: cargo make all-features
@ -83,15 +82,14 @@ jobs:
override: true
- uses: davidB/rust-cargo-make@v1
- name: cargo target cache
- name: target/debug/deps
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-target-${{ matrix.feature }}-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
path: target/debug/deps
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-target-${{ matrix.feature }}-${{ hashFiles('**/Cargo.toml') }}
${{ runner.os }}-cargo-target-${{ matrix.feature }}
${{ runner.os }}-cargo-target
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
${{ runner.os }}-cargo
- name: cargo make
run: cargo make ${{ matrix.feature }}
@ -131,15 +129,15 @@ jobs:
override: true
- uses: davidB/rust-cargo-make@v1
- name: cargo target cache
- name: target/debug/deps
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-target-${{ matrix.version }}-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
path: target/debug/deps
key: ${{ runner.os }}-cargo-${{ matrix.version }}-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-target-${{ matrix.version }}-${{ hashFiles('**/Cargo.toml') }}
${{ runner.os }}-cargo-target-${{ matrix.version }}
${{ runner.os }}-cargo-target
${{ runner.os }}-cargo-${{ matrix.version }}-${{ hashFiles('**/Cargo.toml') }}
${{ runner.os }}-cargo-${{ matrix.version }}
${{ runner.os }}-cargo
- name: cargo make all-features
run: cargo make all-features
@ -159,10 +157,10 @@ jobs:
uses: actions/cache@v1
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-cleanliness-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-cleanliness-${{ hashFiles('**/Cargo.toml') }}
${{ runner.os }}-cargo-cleanliness
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
${{ runner.os }}-cargo
${{ runner.os }}-cargo
- uses: actions-rs/toolchain@v1
@ -173,16 +171,6 @@ jobs:
override: true
- uses: davidB/rust-cargo-make@v1
- name: cargo target cache
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-target-cleanliness-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-target-cleanliness-${{ hashFiles('**/Cargo.toml') }}
${{ runner.os }}-cargo-target-cleanliness
${{ runner.os }}-cargo-target
# Clippy
- name: cargo make clippy
run: cargo make clippy
@ -209,7 +197,6 @@ jobs:
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
${{ runner.os }}-cargo
- uses: actions-rs/toolchain@v1
with:
profile: minimal
@ -217,15 +204,24 @@ jobs:
override: true
- uses: davidB/rust-cargo-make@v1
- name: cargo target cache
- name: target/bind
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-target-compat-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
path: target/bind
key: ${{ runner.os }}-cargo-target-bind-${{ hashFiles('**/Makefile.toml') }}
restore-keys: |
${{ runner.os }}-cargo-target-compat-${{ hashFiles('**/Cargo.toml') }}
${{ runner.os }}-cargo-target-compat
${{ runner.os }}-cargo-target
${{ runner.os }}-cargo-target-bind-${{ hashFiles('**/Makefile.toml') }}
${{ runner.os }}-cargo-target-bind
- name: target/debug/deps
uses: actions/cache@v1
with:
path: target/debug/deps
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
${{ runner.os }}-cargo
- name: cargo make bind-compatibility
run: cargo make bind-compatibility

View File

@ -47,13 +47,15 @@ Invoke-WebRequest "https://curl.haxx.se/ca/cacert.pem" -O "${env:OPENSSL_DIR}\ca
[tasks.install-bind]
workspace = false
description = "Installs BIND9 on Ubuntu"
condition = { platforms = ["linux", "mac"], files_not_exist = ["${TDNS_BIND_PATH}/bin/named/named"] }
env = { BIND_VER="9.11.7" }
condition = { platforms = ["linux", "mac"], files_not_exist = ["${TDNS_BIND_PATH}/sbin/named"] }
env = { BIND_VER="9.11.7" }
script_runner = "@shell"
script = [
'''
set -e
if ${TDNS_BIND_PATH}/sbin/named -v ; then exit 0 ; fi
## This must run after OpenSSL installation
echo installing python-ply
@ -70,12 +72,16 @@ ls -la ${TARGET_DIR:?}/bind-${BIND_VER}.tar.gz
tar -xzf ${TARGET_DIR:?}/bind-${BIND_VER}.tar.gz -C ${TARGET_DIR:?}
echo "----> compiling bind"
rm -rf ${TDNS_BIND_PATH:?}
mv ${TARGET_DIR:?}/bind-${BIND_VER} ${TDNS_BIND_PATH:?}
cd ${TDNS_BIND_PATH:?}
cd ${TARGET_DIR:?}/bind-${BIND_VER}
./configure ${WITH_OPENSSL}
make
./configure --prefix ${TDNS_BIND_PATH:?} ${WITH_OPENSSL}
make install
cd -
${TDNS_BIND_PATH}/sbin/named -v
rm ${TARGET_DIR:?}/bind-${BIND_VER}.tar.gz
rm -rf ${TARGET_DIR:?}/bind-${BIND_VER}
'''
]

View File

@ -205,9 +205,11 @@ fn trust_dns_tcp_bench(b: &mut Bencher) {
fn bind_process() -> (NamedProcess, u16) {
let test_port = find_test_port();
let bind_path = env::var("TDNS_BIND_PATH").unwrap_or_else(|_| "bind".to_owned());
let bind_path = env::var("TDNS_BIND_PATH").unwrap_or_else(|_| "".to_owned());
let server_path = env::var("TDNS_WORKSPACE_ROOT").unwrap_or_else(|_| "..".to_owned());
let bind_path = format!("{}/sbin/named", bind_path);
// create the work directory
let working_dir = format!("{}/../target/bind_pwd", server_path);
if !Path::new(&working_dir).exists() {

View File

@ -20,7 +20,7 @@ pub fn named_process() -> (NamedProcess, u16) {
let test_port = find_test_port();
let bind_path = env::var("TDNS_BIND_PATH").expect("TDNS_BIND_PATH not set");
let bind_path = format!("{}/bin/named/named", bind_path);
let bind_path = format!("{}/sbin/named", bind_path);
println!(
"Path to BIND '{}' this can be changed with the TDNS_BIND_PATH environment variable",