Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post vendored crates tarball #2210

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ jobs:
- name: Package
run: |
make dist
- name: Create vendored crates package
if: matrix.configuration[0] == 'static' && startsWith(github.ref, 'refs/tags/v')
run: |
make vendored-crates
- name: Upload source dist artifact
if: matrix.configuration[0] == 'dynamic' && !startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-artifact@v4
Expand All @@ -88,6 +92,7 @@ jobs:
sile-${{ env.VERSION }}.pdf
sile-${{ env.VERSION }}.zip
sile-${{ env.VERSION }}.tar.zst
sile-vendored-crates-${{ env.VERSION }}.tar.zst
sile-${{ env.CARCH }}
sile-${{ env.VERSION }}.sha256.txt

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ build/
*.debug
gh-pages
sile-[0-9\.]*
sile-vendored-crates-[0-9\.]*
*.rockslock
.dockerignore
luacov.*.out
Expand All @@ -68,6 +69,7 @@ node_modules
lua_modules
lua_modules_dist
package-lock.json
vendor

# Editor entrails
.vscode/
Expand Down
7 changes: 6 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ force: ;
PHONY_DEVELOPER_TARGETS = busted compare coverage \
docker-dep-check docker-ghcr-to-hub docker-test-dist gource.webm lint luacheck luarocks-lint \
prerelease regression_previews regressions release release-preview stylua typos tagrelease \
test update_expecteds update_libtexpdf
test update_expecteds update_libtexpdf vendored-crates
.PHONY: $(PHONY_DEVELOPER_TARGETS)

if DEVELOPER_MODE
Expand Down Expand Up @@ -482,6 +482,11 @@ docker-test-dist: export DOCKER_TAG = dist-test
docker-test-dist:
./hooks/build $(VERSION)

vendored-crates: sile-vendored-crates-$(VERSION).tar.zst

sile-vendored-crates-$(VERSION).tar.zst: cargo-vendor
tardir=vendor && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} > $@

gource.webm:
$(MKDIR_P) /tmp/gravatars
magick documentation/sile-logo.pdf[0] -density 300 -colorspace RGB -negate -resize 50% /tmp/sile-logo.jpg
Expand Down
5 changes: 4 additions & 1 deletion build-aux/que_rust_boilerplate.am
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ $(_RUST_OUT) $(CARGO_BIN): $(@PACKAGE_VAR@_SOURCES) $(nodist_@PACKAGE_VAR@_SOURC
$(CARGO_ENV) $(CARGO) build --target $(CARGO_TARGET_TRIPLE) --quiet --message-format=json $(CARGO_FEATURE_ARGS) $(CARGO_RELEASE_ARGS) | \
$(JQ) -sr 'map(select(.reason == "build-script-executed")) | last | .out_dir' > $(_RUST_OUT)

RUST_DEVELOPER_TARGETS = cargo-test clippy rustfmt
RUST_DEVELOPER_TARGETS = cargo-test clippy rustfmt cargo-vendor
.PHONY: $(RUST_DEVELOPER_TARGETS)

if DEVELOPER_MODE
Expand All @@ -83,6 +83,9 @@ clean-cargo:
cargo-test: $(PACKAGE_NAME)$(EXEEXT)
$(CARGO_ENV) $(CARGO) $(CARGO_VERBOSE) test $(CARGO_FEATURE_ARGS) --locked

cargo-vendor:
$(CARGO_ENV) $(CARGO) vendor --locked

else !DEVELOPER_MODE

$(RUST_DEVELOPER_TARGETS):
Expand Down
Loading