Skip to content

Commit

Permalink
Attempt full build
Browse files Browse the repository at this point in the history
  • Loading branch information
rnijveld committed Apr 12, 2024
1 parent 83e2fe1 commit ddd74af
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 29 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
base:
uses: "tweedegolf/actions-container-helpers/.github/workflows/container-image.yml@main"
with:
artifact: artifact
push: ${{ github.ref == 'refs/heads/main' }}
platforms: "linux/amd64,linux/arm64"
build-args: |
Expand Down
53 changes: 29 additions & 24 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_call:

jobs:
prebuild_binaries:
prebuild-binaries:
runs-on: ubuntu-latest
steps:
- name: Setup Rust toolchain
Expand Down Expand Up @@ -36,41 +36,46 @@ jobs:
EOF
cross build --release --target aarch64-unknown-linux-gnu --no-default-features --features "postgres, sqlite-bundled"
cross build --release --target x86_64-unknown-linux-gnu --no-default-features --features "postgres, sqlite-bundled"
mv target/aarch64-unknown-linux-gnu target/arm64
mv target/x86_64-unknown-linux-gnu target/amd64
- name: Download and build cargo-llvm-lines
run: |
cargo clone cargo-llvm-lines
cd cargo-llvm-lines
cross build --release --target aarch64-unknown-linux-gnu
cross build --release --target x86_64-unknown-linux-gnu
mv target/aarch64-unknown-linux-gnu target/arm64
mv target/x86_64-unknown-linux-gnu target/amd64
- name: Upload artifacts
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: artifact
path: |
diesel_cli/target/x86_64-unknown-linux-gnu/release/diesel
diesel_cli/target/aarch64-unknown-linux-gnu/release/diesel
cargo-llvm-lines/target/x86_64-unknown-linux-gnu/release/cargo-llvm-lines
cargo-llvm-lines/target/aarch64-unknown-linux-gnu/release/cargo-llvm-lines
diesel_cli/target/amd64/release/diesel
diesel_cli/target/arm64/release/diesel
cargo-llvm-lines/target/amd64/release/cargo-llvm-lines
cargo-llvm-lines/target/arm64/release/cargo-llvm-lines
if-no-files-found: error

# build:
# strategy:
# matrix:
# include:
# - version: stable
# latest: false
# - version: beta
# latest: false
# - version: nightly
# latest: false
# - version: 1.77
# latest: true
# - version: 1.76
# latest: false
# uses: "./.github/workflows/docker-images.yml"
# with:
# version: ${{ matrix.version }}
# latest: ${{ matrix.latest }}
# node_version: "20"
build:
needs: [prebuild-binaries]
strategy:
matrix:
include:
- version: stable
latest: false
- version: beta
latest: false
- version: nightly
latest: false
- version: 1.77
latest: true
- version: 1.76
latest: false
uses: "./.github/workflows/docker-images.yml"
with:
version: ${{ matrix.version }}
latest: ${{ matrix.latest }}
node_version: "20"
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ RUN set -eux; \
cargo --version; \
rustc --version;

COPY diesel_cli/target/$TARGETARCH/release/diesel /usr/local/cargo/bin/diesel
COPY cargo-llvm-lines/target/$TARGETARCH/release/cargo-llvm-lines /usr/local/cargo/bin/cargo-llvm-lines

ARG SCCACHE_VERSION
ENV SCCACHE_VERSION ${SCCACHE_VERSION}

Expand Down Expand Up @@ -131,7 +134,6 @@ RUN set -eux; \
cargo-audit \
cargo-outdated \
cargo-bloat \
cargo-llvm-lines \
cargo-llvm-cov \
cargo-watch \
cargo-edit \
Expand All @@ -151,11 +153,12 @@ RUN set -eux; \
cargo sweep --version; \
cargo chef --version; \
cargo upgrade --version; \
cargo llvm-lines --version; \
cargo llvm-cov --version; \
cargo bloat --version; \
cargo outdated --version; \
cargo audit --version;
cargo audit --version; \
diesel --version; \
cargo llvm-lines --version;

ARG CARGO_UDEPS_VERSION
ENV CARGO_UDEPS_VERSION ${CARGO_UDEPS_VERSION}
Expand Down Expand Up @@ -184,5 +187,3 @@ RUN set -eux; \
rm -rf "/tmp/cargo-udeps-v${CARGO_UDEPS_VERSION}-${udepsArch}/"; \
rm -rf "/tmp/cargo-udeps-v${CARGO_UDEPS_VERSION}-${udepsArch}.tar.gz"; \
cargo udeps --version;

RUN cargo install diesel_cli --no-default-features --features "postgres sqlite"

0 comments on commit ddd74af

Please sign in to comment.