diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6d6ceb3..d95fb35 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,10 +50,10 @@ jobs: os: windows-latest ext: .exe archive: zip - - target: aarch64-pc-windows-msvc - os: windows-latest - ext: .exe - archive: zip +# - target: aarch64-pc-windows-msvc +# os: windows-latest +# ext: .exe +# archive: zip - target: i686-pc-windows-msvc os: windows-latest ext: .exe @@ -61,7 +61,7 @@ jobs: - target: x86_64-unknown-linux-gnu os: ubuntu-latest archive: tar.gz - - target: aarch64-unknown-linux-gnu + - target: aarch64-unknown-linux-musl os: ubuntu-latest archive: tar.gz - target: x86_64-unknown-linux-musl @@ -150,7 +150,7 @@ jobs: uses: docker/build-push-action@v5 with: context: . - file: ./Dockerfile + file: ./manifest/docker/release/x86_64-linux-musl/Dockerfile platforms: linux/amd64 push: true tags: ${{ steps.meta.outputs.tags }} diff --git a/Cargo.toml b/Cargo.toml index ea444bc..00e5a9b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,6 +41,5 @@ tracing-futures = "0.2.5" tracing-subscriber = { version = "0.3.16", features = ["env-filter"] } url = "2.3.1" uuid = { version = "1.2.1", features = ["v1", "v4"] } - -[target.'cfg(target_env = "musl")'.dependencies] openssl = { version = "0.10", features = ["vendored"] } + diff --git a/manifest/docker/builder/aarch64-musl/Dockerfile b/manifest/docker/builder/aarch64-musl/Dockerfile new file mode 100644 index 0000000..40c6636 --- /dev/null +++ b/manifest/docker/builder/aarch64-musl/Dockerfile @@ -0,0 +1,3 @@ +FROM messense/rust-musl-cross:aarch64-musl +RUN rustup update nightly && \ + rustup target add --toolchain nightly aarch64-unknown-linux-musl \ No newline at end of file diff --git a/Dockerfile b/manifest/docker/release/x86_64-linux-musl/Dockerfile similarity index 76% rename from Dockerfile rename to manifest/docker/release/x86_64-linux-musl/Dockerfile index 8b053fc..63c6f89 100644 --- a/Dockerfile +++ b/manifest/docker/release/x86_64-linux-musl/Dockerfile @@ -1,4 +1,6 @@ FROM clux/muslrust:stable as builder +RUN rustup update nightly && \ + rustup target add --toolchain nightly x86_64-unknown-linux-musl WORKDIR /app COPY . . RUN cargo build --release --target x86_64-unknown-linux-musl @@ -11,7 +13,7 @@ RUN apk add alpine-conf tzdata && \ ENV WORKDIR /app VOLUME $WORKDIR/data -ADD config.example.toml $WORKDIR/data/ +ADD ./config.example.toml $WORKDIR/data/ COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/jsdelivr_proxy $WORKDIR/jsdelivr_proxy WORKDIR $WORKDIR