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

WIP DON'T MERGE #1665

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
17 changes: 6 additions & 11 deletions .github/workflows/static_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,19 @@ jobs:
test-release:
name: Build for Linux
runs-on: ubuntu-latest
container:
image: ekidd/rust-musl-builder
volumes:
- ${{ github.workspace }}:/home/rust/src
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@main
- name: Build-musl
run: |
echo "Building static binaries using ekidd/rust-musl-builder"
sudo chown rust -R /opt/rust/
rustup target add x86_64-unknown-linux-musl
RUSTFLAGS="-Clink-arg=-Wl,--allow-multiple-definition" cargo build --release --features=auth
- name: run fastn
run: ./target/x86_64-unknown-linux-musl/release/fastn --version
docker build -t fastn-build-image .
docker run -it --name fastn-build fastn-build-image
mkdir -p out
docker cp fastn-build:/home/rust/src/target/x86_64-unknown-linux-musl/release/fastn out/
- name: ls files
run: |
ls target/
ls target/x86_64-unknown-linux-musl/release/fastn
file target/x86_64-unknown-linux-musl/release/fastn
ls out/
file out/fastn
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM ekidd/rust-musl-builder
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should move this to .github folder.


# We need to add the source code to the image because `rust-musl-builder`
# assumes a UID of 1000
ADD --chown=rust:rust . ./

CMD RUSTFLAGS="-Clink-arg=-Wl,--allow-multiple-definition" cargo build --release --features=auth
Loading