Skip to content

Commit

Permalink
Remove extra tools from this repo
Browse files Browse the repository at this point in the history
  • Loading branch information
kylewlacy committed Jun 19, 2024
1 parent d82dfbf commit 2178108
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 701 deletions.
63 changes: 2 additions & 61 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,12 @@ jobs:
- name: x86_64-linux
runs_on: ubuntu-22.04
target: x86_64-unknown-linux-gnu
tools_target: x86_64-unknown-linux-musl
packed_exec: brioche-packed-userland-exec
- name: x86_64-macos
runs_on: macos-14
target: x86_64-apple-darwin
tools_target: x86_64-apple-darwin
packed_exec: brioche-packed-plain-exec
- name: aarch64-macos
runs_on: macos-14
target: aarch64-apple-darwin
tools_target: aarch64-apple-darwin
packed_exec: brioche-packed-plain-exec

runs-on: ${{ matrix.platform.runs_on }}
steps:
- name: Checkout code
Expand All @@ -114,54 +107,23 @@ jobs:
--target="$TARGET"
env:
TARGET: ${{ matrix.platform.target }}
- name: Build brioche-pack tools
run: |
cargo build \
--all \
--bin brioche-packer \
--bin brioche-ld \
--release \
--target="$TOOLS_TARGET"
cargo +"$NIGHTLY_TOOLCHAIN" build \
--all \
--bin brioche-packed-plain-exec \
--bin brioche-packed-userland-exec \
--profile=release-tiny \
--target="$TOOLS_TARGET" \
-Z 'build-std=std,panic_abort' \
-Z 'build-std-features=panic_immediate_abort'
env:
TOOLS_TARGET: ${{ matrix.platform.tools_target }}
- name: Prepare artifact
run: |
mkdir -p "artifacts/brioche/$PLATFORM/"
mkdir -p "artifacts/brioche-pack/$PLATFORM/bin/"
cp \
"target/$TARGET/release/brioche" \
"artifacts/brioche/$PLATFORM/"
cp \
"target/$TOOLS_TARGET/release/brioche-packer" \
"target/$TOOLS_TARGET/release/brioche-ld" \
"target/$TOOLS_TARGET/release-tiny/brioche-packed-plain-exec" \
"target/$TOOLS_TARGET/release-tiny/brioche-packed-userland-exec" \
"artifacts/brioche-pack/$PLATFORM/bin/"
cp "artifacts/brioche-pack/$PLATFORM/bin/$PACKED_EXEC" "artifacts/brioche-pack/$PLATFORM/bin/brioche-packed-exec"
(cd "artifacts/brioche-pack/$PLATFORM/" && tar --zstd -cf "../../brioche/$PLATFORM/brioche-pack.tar.zstd" .)
if command -v sha256sum &> /dev/null; then
find artifacts/ -type f | xargs sha256sum
fi
if command -v tree &> /dev/null; then
tree --du -h artifacts/brioche-pack
tree --du -h artifacts/brioche
fi
env:
PLATFORM: ${{ matrix.platform.name }}
TARGET: ${{ matrix.platform.target }}
TOOLS_TARGET: ${{ matrix.platform.tools_target }}
PACKED_EXEC: ${{ matrix.platform.packed_exec }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -189,31 +151,15 @@ jobs:
with:
name: brioche-aarch64-macos
path: artifacts/brioche
# Prepare the upload for the current commit and branch:
# - The current branch will be uploaded with all artifacts
# - The current commit will be uploaded with most artifacts (with some
# exceptions to avoid wasting space)
# - The current files from the bucket will be downloaded first,
# so that existing files are not overwritten. This is so that file
# hashes never change under the commit e.g. if the GitHub Actions
# workflow is re-run
# Upload the Brioche build for the current branch
- name: Prepare upload
run: |
mkdir -p artifacts/uploads/commit artifacts/uploads/branch
cp -r artifacts/brioche/* artifacts/uploads/commit/
mkdir -p artifacts/uploads/branch
cp -r artifacts/brioche/* artifacts/uploads/branch/
rm artifacts/uploads/commit/*/brioche
if command -v tree &> /dev/null; then
tree --du -h artifacts/uploads/commit
tree --du -h artifacts/uploads/branch
fi
aws s3 sync \
--endpoint "$S3_ENDPOINT" \
"s3://brioche-dev-development-content/github.com/brioche-dev/brioche/commits/$GITHUB_SHA/" \
artifacts/uploads/commit/
env:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_S3_SECRET_ACCESS_KEY }}
Expand All @@ -226,11 +172,6 @@ jobs:
--delete \
artifacts/uploads/branch/ \
"s3://brioche-dev-development-content/github.com/brioche-dev/brioche/branches/$GITHUB_REF_NAME/"
aws s3 sync \
--endpoint "$S3_ENDPOINT" \
--delete \
artifacts/uploads/commit/ \
"s3://brioche-dev-development-content/github.com/brioche-dev/brioche/commits/$GITHUB_SHA/"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_S3_SECRET_ACCESS_KEY }}
Expand Down
80 changes: 3 additions & 77 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
members = ["crates/brioche", "crates/brioche-core", "crates/brioche-ld", "crates/brioche-pack", "crates/brioche-packed-plain-exec", "crates/brioche-packed-userland-exec"]
members = ["crates/brioche", "crates/brioche-core", "crates/brioche-pack"]
resolver = "2"

[profile.dev]
Expand Down
10 changes: 0 additions & 10 deletions crates/brioche-ld/Cargo.toml

This file was deleted.

Loading

0 comments on commit 2178108

Please sign in to comment.