Skip to content

Commit 74a0473

Browse files
authored
Merge pull request #279 from sourcefrog/default-features
Build s3 & sftp by default
2 parents 00b929a + 2fbd23e commit 74a0473

File tree

3 files changed

+12
-19
lines changed

3 files changed

+12
-19
lines changed

.github/workflows/rust.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ jobs:
5252
fail-fast: true
5353
matrix:
5454
os: [ubuntu-latest, windows-latest, macOS-latest]
55-
features: ["", "s3"]
5655
version: [stable, nightly, "1.79"]
5756

5857
steps:
@@ -61,21 +60,17 @@ jobs:
6160
with:
6261
toolchain: ${{ matrix.version }}
6362
- uses: Swatinem/rust-cache@v2
64-
with:
65-
key: ${{ matrix.features }}
6663
- name: Show version
6764
run: |
6865
rustup show
6966
cargo --version
7067
rustc --version
7168
- name: Build
7269
run: >
73-
cargo build --all-targets --no-default-features --features=${{
74-
matrix.features }} --features fail/failpoints
70+
cargo build --all-targets --features fail/failpoints
7571
- name: Test
7672
run: >
77-
cargo test --no-default-features --features=${{ matrix.features }}
78-
--features fail/failpoints -- --include-ignored
73+
cargo test --features fail/failpoints -- --include-ignored
7974
8075
# Run rustfmt separately so that it does not block test results
8176
rustfmt:
@@ -136,8 +131,8 @@ jobs:
136131
tool: cargo-mutants
137132
- name: Mutants in diff
138133
run: >
139-
cargo mutants --no-shuffle -vV --in-diff git.diff --in-place -- --features
140-
fail/failpoints
134+
cargo mutants --no-shuffle -vV --in-diff git.diff --in-place --
135+
--features fail/failpoints
141136
- name: Archive mutants.out
142137
uses: actions/upload-artifact@v4
143138
if: always()
@@ -168,11 +163,10 @@ jobs:
168163
# Don't use the S3 features because they require AWS credentials for realistic
169164
# testing.
170165
run: |
171-
cargo mutants --no-shuffle -vV --cargo-arg=--no-default-features \
172-
--in-place \
173-
--baseline=skip --shard ${{ matrix.shard }}/10 \
174-
-- \
175-
--features fail/failpoints
166+
cargo mutants --no-shuffle -vV --in-place --baseline=skip \
167+
--shard ${{ matrix.shard }}/10 \
168+
-- \
169+
--features fail/failpoints
176170
- name: Archive results
177171
uses: actions/upload-artifact@v4
178172
if: always()

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ version = "24.8.0"
1212
rust-version = "1.79"
1313

1414
[features]
15+
default = ["s3", "sftp"]
1516
s3 = [
1617
"dep:aws-config",
1718
"dep:aws-sdk-s3",

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ automatically excluded from backups.
114114
From 23.9 Conserve supports storing backups in Amazon S3. AWS IAM credentials are
115115
read from the standard sources: the environment, config file, or, on EC2, the instance metadata service.
116116

117-
S3 support is not built by default, but can be turned on by passing `cargo install --features s3`.
118-
119117
To use this, just specify an S3 URL for the archive location. The bucket must already exist.
120118

121119
conserve init s3://my-bucket/
@@ -142,10 +140,10 @@ To install from a git checkout, run
142140

143141
### Optional features
144142

145-
The following options can be enabled with `--features`:
143+
The following features are enabled by default, but can be turned off with `cargo install --no-default-features` if they are not needed:
146144

147-
* `s3`: support for storing backups in Amazon S3 (or compatible services)
148-
* `sftp`: support for storing backups on SFTP servers, addressed with `sftp://` URLs
145+
- `s3`: support for storing backups in Amazon S3 (or compatible services)
146+
- `sftp`: support for storing backups on SFTP servers, addressed with `sftp://` URLs
149147

150148
### Arch Linux
151149

0 commit comments

Comments
 (0)