Configure caching of Rust build artifacts.
Don't 'cd' into the card-functionality directory to run tests ('cd'-ing broke the caching mechanism). Adjust test configurations accordingly.
This commit is contained in:
parent
4988ccea49
commit
f312ce94f7
7 changed files with 75 additions and 37 deletions
|
@ -3,12 +3,23 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- hw-builddeps
|
|
||||||
- hw-import
|
|
||||||
- hw-keygen
|
|
||||||
- lint
|
- lint
|
||||||
- test
|
- test
|
||||||
- virtual-test
|
- virtual-test
|
||||||
|
- hw-builddeps
|
||||||
|
- hw-import
|
||||||
|
- hw-keygen
|
||||||
|
|
||||||
|
variables:
|
||||||
|
CARGO_HOME: cargo/
|
||||||
|
CARGO_TERM_VERBOSE: 'true'
|
||||||
|
|
||||||
|
cache: &general_cache_config
|
||||||
|
# default key is default
|
||||||
|
# default policy is pull-push
|
||||||
|
paths:
|
||||||
|
- target/
|
||||||
|
- $CARGO_HOME
|
||||||
|
|
||||||
reuse:
|
reuse:
|
||||||
stage: lint
|
stage: lint
|
||||||
|
@ -35,6 +46,11 @@ cargo-test:
|
||||||
- apt clean
|
- apt clean
|
||||||
script:
|
script:
|
||||||
- cargo test
|
- cargo test
|
||||||
|
cache:
|
||||||
|
# inherit all general cache settings
|
||||||
|
<<: *general_cache_config
|
||||||
|
# override the key
|
||||||
|
key: "rust-latest"
|
||||||
|
|
||||||
cargo-test-debian-bookworm:
|
cargo-test-debian-bookworm:
|
||||||
stage: test
|
stage: test
|
||||||
|
@ -46,6 +62,11 @@ cargo-test-debian-bookworm:
|
||||||
- apt clean
|
- apt clean
|
||||||
script:
|
script:
|
||||||
- cargo test
|
- cargo test
|
||||||
|
cache:
|
||||||
|
# inherit all general cache settings
|
||||||
|
<<: *general_cache_config
|
||||||
|
# override the key
|
||||||
|
key: "bookworm"
|
||||||
|
|
||||||
run_cardtest_smartpgp:
|
run_cardtest_smartpgp:
|
||||||
stage: virtual-test
|
stage: virtual-test
|
||||||
|
@ -53,11 +74,15 @@ run_cardtest_smartpgp:
|
||||||
script:
|
script:
|
||||||
- /etc/init.d/pcscd start
|
- /etc/init.d/pcscd start
|
||||||
- su - -c "sh /home/jcardsim/run-card.sh" jcardsim
|
- su - -c "sh /home/jcardsim/run-card.sh" jcardsim
|
||||||
- cd card-functionality
|
- cargo run -p openpgp-card-tests --bin import -- $CONFIG
|
||||||
- cargo run --bin import -- $CONFIG
|
- cargo run -p openpgp-card-tests --bin keygen -- $CONFIG
|
||||||
- cargo run --bin keygen -- $CONFIG
|
|
||||||
variables:
|
variables:
|
||||||
CONFIG: "docker/test-smartpgp.toml"
|
CONFIG: "card-functionality/docker/test-smartpgp.toml"
|
||||||
|
cache:
|
||||||
|
# inherit all general cache settings
|
||||||
|
<<: *general_cache_config
|
||||||
|
# override the key
|
||||||
|
key: "bookworm"
|
||||||
|
|
||||||
run_cardtest_ykneo:
|
run_cardtest_ykneo:
|
||||||
stage: virtual-test
|
stage: virtual-test
|
||||||
|
@ -65,11 +90,15 @@ run_cardtest_ykneo:
|
||||||
script:
|
script:
|
||||||
- /etc/init.d/pcscd start
|
- /etc/init.d/pcscd start
|
||||||
- su - -c "sh /home/jcardsim/run-card.sh" jcardsim
|
- su - -c "sh /home/jcardsim/run-card.sh" jcardsim
|
||||||
- cd card-functionality
|
- cargo run -p openpgp-card-tests --bin import -- $CONFIG
|
||||||
- cargo run --bin import -- $CONFIG
|
- cargo run -p openpgp-card-tests --bin keygen -- $CONFIG
|
||||||
- cargo run --bin keygen -- $CONFIG
|
|
||||||
variables:
|
variables:
|
||||||
CONFIG: "docker/test-ykneo.toml"
|
CONFIG: "card-functionality/docker/test-ykneo.toml"
|
||||||
|
cache:
|
||||||
|
# inherit all general cache settings
|
||||||
|
<<: *general_cache_config
|
||||||
|
# override the key
|
||||||
|
key: "bookworm"
|
||||||
|
|
||||||
hardware-builddeps:
|
hardware-builddeps:
|
||||||
stage: hw-builddeps
|
stage: hw-builddeps
|
||||||
|
@ -101,15 +130,20 @@ hardware-builddeps:
|
||||||
parallel:
|
parallel:
|
||||||
matrix:
|
matrix:
|
||||||
- CONFIG:
|
- CONFIG:
|
||||||
- "ci/basic-2_1.toml"
|
- "card-functionality/ci/basic-2_1.toml"
|
||||||
- "ci/nitro-pro1.toml"
|
- "card-functionality/ci/nitro-pro1.toml"
|
||||||
- "ci/nitro-pro2.toml"
|
- "card-functionality/ci/nitro-pro2.toml"
|
||||||
- "ci/nitro-start.toml"
|
- "card-functionality/ci/nitro-start.toml"
|
||||||
script:
|
script:
|
||||||
- /etc/init.d/pcscd start
|
- /etc/init.d/pcscd start
|
||||||
#- sleep 5
|
#- sleep 5
|
||||||
- cd card-functionality
|
|
||||||
- cargo run --bin $ARG -- $CONFIG
|
- cargo run --bin $ARG -- $CONFIG
|
||||||
|
cache:
|
||||||
|
# inherit all general cache settings
|
||||||
|
<<: *general_cache_config
|
||||||
|
# cookiejar does not access the cache of the shared gitlab runners,
|
||||||
|
# so use a different key for clarity
|
||||||
|
key: "cookiejar"
|
||||||
|
|
||||||
import:
|
import:
|
||||||
extends: .hw-test-template
|
extends: .hw-test-template
|
||||||
|
|
|
@ -4,4 +4,8 @@
|
||||||
[card.basic-2_1]
|
[card.basic-2_1]
|
||||||
backend.pcsc = "0005:00002E32"
|
backend.pcsc = "0005:00002E32"
|
||||||
config.keygen = ["RSA2k", "RSA3k", "RSA4k"]
|
config.keygen = ["RSA2k", "RSA3k", "RSA4k"]
|
||||||
config.import = ["data/rsa2k.sec", "data/rsa3k.sec", "data/rsa4k.sec"]
|
config.import = [
|
||||||
|
"card-functionality/data/rsa2k.sec",
|
||||||
|
"card-functionality/data/rsa3k.sec",
|
||||||
|
"card-functionality/data/rsa4k.sec"
|
||||||
|
]
|
||||||
|
|
|
@ -7,7 +7,7 @@ config.keygen = [
|
||||||
"RSA2k", "RSA3k", "RSA4k",
|
"RSA2k", "RSA3k", "RSA4k",
|
||||||
]
|
]
|
||||||
config.import = [
|
config.import = [
|
||||||
"data/rsa2k.sec",
|
"card-functionality/data/rsa2k.sec",
|
||||||
"data/rsa3k.sec",
|
"card-functionality/data/rsa3k.sec",
|
||||||
"data/rsa4k.sec",
|
"card-functionality/data/rsa4k.sec",
|
||||||
]
|
]
|
||||||
|
|
|
@ -8,10 +8,10 @@ config.keygen = [
|
||||||
"NIST256", "NIST384", "NIST521",
|
"NIST256", "NIST384", "NIST521",
|
||||||
]
|
]
|
||||||
config.import = [
|
config.import = [
|
||||||
"data/rsa2k.sec",
|
"card-functionality/data/rsa2k.sec",
|
||||||
"data/rsa3k.sec",
|
"card-functionality/data/rsa3k.sec",
|
||||||
"data/rsa4k.sec",
|
"card-functionality/data/rsa4k.sec",
|
||||||
"data/nist256.sec",
|
"card-functionality/data/nist256.sec",
|
||||||
"data/nist384.sec",
|
"card-functionality/data/nist384.sec",
|
||||||
"data/nist521.sec"
|
"card-functionality/data/nist521.sec"
|
||||||
]
|
]
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
backend.pcsc = "FFFE:43233446"
|
backend.pcsc = "FFFE:43233446"
|
||||||
config.keygen = ["RSA2k", "NIST256", "Curve25519"]
|
config.keygen = ["RSA2k", "NIST256", "Curve25519"]
|
||||||
config.import = [
|
config.import = [
|
||||||
"data/rsa2k.sec",
|
"card-functionality/data/rsa2k.sec",
|
||||||
"data/rsa4k.sec",
|
"card-functionality/data/rsa4k.sec",
|
||||||
"data/nist256.sec",
|
"card-functionality/data/nist256.sec",
|
||||||
"data/25519.sec",
|
"card-functionality/data/25519.sec",
|
||||||
]
|
]
|
||||||
|
|
|
@ -8,11 +8,11 @@ config.keygen = [
|
||||||
"NIST256", "NIST384", "NIST521"
|
"NIST256", "NIST384", "NIST521"
|
||||||
]
|
]
|
||||||
config.import = [
|
config.import = [
|
||||||
"data/rsa2k.sec",
|
"card-functionality/data/rsa2k.sec",
|
||||||
"data/rsa3k.sec",
|
"card-functionality/data/rsa3k.sec",
|
||||||
"data/rsa4k.sec",
|
"card-functionality/data/rsa4k.sec",
|
||||||
"data/nist256.sec",
|
"card-functionality/data/nist256.sec",
|
||||||
"data/nist384.sec",
|
"card-functionality/data/nist384.sec",
|
||||||
"data/nist521.sec"
|
"card-functionality/data/nist521.sec"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -7,5 +7,5 @@ config.keygen = [
|
||||||
"RSA2k",
|
"RSA2k",
|
||||||
]
|
]
|
||||||
config.import = [
|
config.import = [
|
||||||
"data/rsa2k.sec",
|
"card-functionality/data/rsa2k.sec",
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue