Skip to content

Commit

Permalink
Updated CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
mdecimus committed Dec 26, 2023
1 parent a26a7bf commit 44092e0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 18 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,25 +86,21 @@ jobs:
- name: Building binary (Unix version)
if: ${{ !contains(matrix.host_os, 'windows') }}
run: |
cargo build --manifest-path=crates/main/Cargo.toml --target=${{ matrix.target }} --no-default-features --features foundationdb --release
cargo build -p mail-server --target=${{ matrix.target }} --no-default-features --features "foundationdb elastic s3 redis" --release
cd target/${{ matrix.target }}/release && tar czvf ../../../stalwart-mail-foundationdb-${{ matrix.target }}.tar.gz stalwart-mail && cd -
cargo build --manifest-path=crates/main/Cargo.toml --target=${{ matrix.target }} --release
cargo build --manifest-path=crates/cli/Cargo.toml --target=${{ matrix.target }} --release
cargo build --manifest-path=crates/install/Cargo.toml --target=${{ matrix.target }} --release
cargo build -p mail-server -p stalwart-cli -p stalwart-install --target=${{ matrix.target }} --release
cd target/${{ matrix.target }}/release
tar czvf ../../../stalwart-mail-sqlite-${{ matrix.target }}.tar.gz stalwart-mail
tar czvf ../../../stalwart-mail-${{ matrix.target }}.tar.gz stalwart-mail
tar czvf ../../../stalwart-cli-${{ matrix.target }}.tar.gz stalwart-cli
tar czvf ../../../stalwart-install-${{ matrix.target }}.tar.gz stalwart-install
cd -
- name: Building binary (Windows version)
if: ${{ contains(matrix.host_os, 'windows') }}
run: |
cargo build --manifest-path=crates/main/Cargo.toml --target=${{ matrix.target }} --release
cargo build --manifest-path=crates/cli/Cargo.toml --target=${{ matrix.target }} --release
cargo build --manifest-path=crates/install/Cargo.toml --target=${{ matrix.target }} --release
cargo build -p mail-server -p stalwart-cli -p stalwart-install --target=${{ matrix.target }} --release
cd target/${{ matrix.target }}/release
7z a ../../../stalwart-mail-sqlite-${{ matrix.target }}.zip stalwart-mail.exe
7z a ../../../stalwart-mail-${{ matrix.target }}.zip stalwart-mail.exe
7z a ../../../stalwart-cli-${{ matrix.target }}.zip stalwart-cli.exe
7z a ../../../stalwart-install-${{ matrix.target }}.zip stalwart-install.exe
cd -
Expand Down Expand Up @@ -162,8 +158,7 @@ jobs:
run: |
export PATH="$HOME/.cargo/bin:$PATH"
cargo build --manifest-path=crates/cli/Cargo.toml --target=${target} --release
cargo build --manifest-path=crates/install/Cargo.toml --target=${target} --release
cargo build -p stalwart-cli -p stalwart-install --target=${target} --release
cd target/${target}/release
tar czvf /artifacts/stalwart-cli-${target}.tar.gz stalwart-cli
tar czvf /artifacts/stalwart-install-${target}.tar.gz stalwart-install
Expand Down Expand Up @@ -226,9 +221,9 @@ jobs:
run: |
export PATH="$HOME/.cargo/bin:$PATH"
cargo build --manifest-path=crates/main/Cargo.toml --target=${target} --release
cargo build -p mail-server --target=${target} --release
cd target/${target}/release
tar czvf /artifacts/stalwart-mail-sqlite-${target}.tar.gz stalwart-mail
tar czvf /artifacts/stalwart-mail-${target}.tar.gz stalwart-mail
cd -
- name: Move packages
Expand Down
6 changes: 3 additions & 3 deletions crates/install/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ fn main() -> std::io::Result<()> {
download_url = format!(
concat!(
"https://github.com/stalwartlabs/{}",
"/releases/latest/download/stalwart-{}-{}-{}.{}"
"/releases/latest/download/stalwart-{}{}-{}.{}"
),
match component {
Component::AllInOne => "mail-server",
Expand All @@ -222,8 +222,8 @@ fn main() -> std::io::Result<()> {
Component::Smtp => unreachable!(),
},
match backend {
Store::FoundationDB => "distributed",
_ => "local",
Store::FoundationDB => "-foundationdb",
_ => "",
},
TARGET,
PKG_EXTENSION
Expand Down
2 changes: 1 addition & 1 deletion crates/main/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jemallocator = "0.5.0"

[features]
#default = ["sqlite", "foundationdb", "postgres", "mysql", "rocks", "elastic", "s3", "redis"]
default = ["sqlite", "foundationdb", "postgres", "mysql", "rocks", "elastic", "s3", "redis"]
default = ["sqlite", "postgres", "mysql", "rocks", "elastic", "s3", "redis"]
sqlite = ["store/sqlite"]
foundationdb = ["store/foundation"]
postgres = ["store/postgres"]
Expand Down
2 changes: 1 addition & 1 deletion tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ resolver = "2"

[features]
#default = ["sqlite", "foundationdb", "postgres", "mysql", "rocks", "elastic", "s3", "redis"]
default = ["sqlite", "foundationdb", "postgres", "mysql", "rocks", "elastic", "s3", "redis"]
default = ["sqlite", "postgres", "mysql", "rocks", "elastic", "s3", "redis"]
sqlite = ["store/sqlite"]
foundationdb = ["store/foundation"]
postgres = ["store/postgres"]
Expand Down

0 comments on commit 44092e0

Please sign in to comment.