Skip to content

Commit

Permalink
build: ARM static build fails
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Oct 7, 2024
1 parent 7459d2f commit be99a38
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 111 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ All notable changes to this project will be documented in this file.
- Use fork of baked_file_system
- Make static build work
- Add do_release script
- Lock versions
- ARM static build fails

### Bump

- Release v0.2.1

### Chore

Expand Down
10 changes: 5 additions & 5 deletions Hacefile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ tasks:
phony: true
always_run: true
dependencies:
- bin/hace
- bin/{{name}}
commands: |
rm ${HOME}/.local/bin/{{NAME}}
cp bin/hace ${HOME}/.local/bin/{{NAME}}
cp bin/{{name}} ${HOME}/.local/bin/{{NAME}}
lint:
dependencies:
Expand Down Expand Up @@ -68,7 +68,7 @@ tasks:
pre-commit:
default: true
outputs:
- .git/hooks/commit-msg
- .git/hooks/commit-msgstatic
- .git/hooks/pre-commit
dependencies:
- .pre-commit-config.yaml
Expand All @@ -84,8 +84,8 @@ tasks:
static:
outputs:
- bin/hace-{{name}}-linux-amd64
- bin/hace-{{name}}-linux-arm64
- bin/{{NAME}}-static-linux-amd64
- bin/{{NAME}}-static-linux-arm64
commands: |
hace clean
./build_static.sh
9 changes: 5 additions & 4 deletions build_static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ docker build . -f Dockerfile.static -t nicolino-builder
docker run -ti --rm -v "$PWD":/app --user="$UID" nicolino-builder /bin/sh -c "cd /app && rm -rf lib shard.lock && shards build -Dnovips --release --without-development --static && strip bin/nicolino"
mv bin/nicolino bin/nicolino-static-linux-amd64

# Build for ARM64
docker build . -f Dockerfile.static --platform linux/arm64 -t hace-builder
docker run -ti --rm -v "$PWD":/app --platform linux/arm64 --user="$UID" hace-builder /bin/sh -c "cd /app && rm -rf lib shard.lock && shards build -Dnovips --release --without-development --static && strip bin/nicolino"
mv bin/hace bin/hace-static-linux-arm64
# # Build for ARM64
# Currently segfaults building dependencies
# docker build . -f Dockerfile.static --platform linux/arm64 -t nicolino-builder
# docker run -ti --rm -v "$PWD":/app --platform linux/arm64 --user="$UID" nicolino-builder /bin/sh -c "cd /app && rm -rf lib shard.lock && shards build -Dnovips --without-development --static && strip bin/nicolino"
# mv bin/nicolino bin/nicolino-static-linux-arm64
2 changes: 1 addition & 1 deletion do_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ git commit -a -m "bump: Release v$VERSION"
git tag "v$VERSION"
git push --tags
hace static
gh release create "v$VERSION" "bin/$PKGNAME-static-linux-amd64" "bin/$PKGNAME-static-linux-arm64" --title "Release v$VERSION" --notes "$(git cliff -l -s all)"
gh release create "v$VERSION" "bin/$PKGNAME-static-linux-amd64" --title "Release v$VERSION" --notes "$(git cliff -l -s all)"
101 changes: 0 additions & 101 deletions shard.lock

This file was deleted.

0 comments on commit be99a38

Please sign in to comment.