Skip to content

Commit 224ab2d

Browse files
committed
build superoptimized releases
1 parent 27d05fe commit 224ab2d

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ jobs:
1515
os: [macos-latest, windows-latest, ubuntu-18.04]
1616
include:
1717
- os: windows-latest
18-
binary_path: target/release/sqlpage.exe
18+
binary_path: target/superoptimized/sqlpage.exe
1919
- os: macos-latest
20-
binary_path: target/release/sqlpage
20+
binary_path: target/superoptimized/sqlpage
2121
- os: ubuntu-18.04
22-
binary_path: target/release/sqlpage
22+
binary_path: target/superoptimized/sqlpage
2323
steps:
2424
- uses: actions/checkout@v2
2525
- uses: actions-rs/toolchain@v1
2626
with: {toolchain: stable, override: true}
2727
- name: build
2828
uses: actions-rs/cargo@v1
29-
with: { command: build, args: --release --locked }
29+
with: { command: build, args: --profile superoptimized --locked }
3030
- uses: actions/upload-artifact@v1
3131
with:
3232
name: sqlpage ${{ matrix.os }}

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sqlpage"
3-
version = "0.4.2"
3+
version = "0.4.3"
44
edition = "2021"
55
description = "A SQL-only web application framework. Takes .sql files and formats the query result using pre-made configurable professional-looking components."
66
keywords = ["web", "sql", "framework"]
@@ -14,7 +14,7 @@ inherits = "release"
1414
strip = "debuginfo"
1515
lto = "fat"
1616
panic = "abort"
17-
codegen-units = 4
17+
codegen-units = 2
1818

1919
[dependencies]
2020
sqlx = { version = "0.6.0", features = ["any", "runtime-actix-rustls", "sqlite", "postgres", "mysql", "chrono"] }

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ RUN apk add --no-cache musl-dev
33
WORKDIR /usr/src/sqlpage
44
RUN cargo init .
55
COPY Cargo.toml Cargo.lock ./
6-
RUN cargo build --release
6+
RUN cargo build --profile superoptimized
77
COPY . .
88
RUN touch src/main.rs
9-
RUN cargo build --release
9+
RUN cargo build --profile superoptimized
1010

1111
FROM alpine:3.17
1212
RUN rm -rf /var/lib/apt/lists/* && \
1313
addgroup -S sqlpage && adduser -S sqlpage -G sqlpage
14-
COPY --from=builder /usr/src/sqlpage/target/release/sqlpage /usr/local/bin/sqlpage
14+
COPY --from=builder /usr/src/sqlpage/target/superoptimized/sqlpage /usr/local/bin/sqlpage
1515
WORKDIR /var/www
1616
COPY --from=builder /usr/src/sqlpage/index.sql .
1717
USER sqlpage

0 commit comments

Comments
 (0)