mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-08-03 18:05:58 -04:00
Merge pull request #346 from AkihiroSuda/riscv64
release.yaml: add riscv64 build
This commit is contained in:
commit
0508524bdd
23
.github/workflows/release.yaml
vendored
23
.github/workflows/release.yaml
vendored
@ -10,18 +10,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: "Register QEMU to /proc/sys/fs/binfmt_misc"
|
||||
run: docker run --rm --privileged linuxkit/binfmt:v0.8
|
||||
- name: "Fetch buildx binary"
|
||||
run: |
|
||||
wget -O buildx https://github.com/docker/buildx/releases/download/v0.4.1/buildx-v0.4.1.linux-amd64
|
||||
chmod +x buildx
|
||||
- name: "Initialize buildx"
|
||||
run: |
|
||||
./buildx create --name cross --platform=amd64,arm,arm64,s390x,ppc64le --use
|
||||
./buildx inspect --bootstrap
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- name: "Build binaries from Containerfile.cross"
|
||||
run: ./buildx build -o /tmp --platform=amd64,arm64,arm,s390x,ppc64le -f Containerfile.cross .
|
||||
run: docker buildx build -o /tmp --platform=amd64,arm64,arm,s390x,ppc64le,riscv64 -f Containerfile.cross .
|
||||
- name: "Create /tmp/artifact"
|
||||
run: |
|
||||
mkdir -p /tmp/artifact
|
||||
@ -30,6 +21,7 @@ jobs:
|
||||
mv /tmp/linux_arm_v7/fuse-overlayfs /tmp/artifact/fuse-overlayfs-armv7l
|
||||
mv /tmp/linux_s390x/fuse-overlayfs /tmp/artifact/fuse-overlayfs-s390x
|
||||
mv /tmp/linux_ppc64le/fuse-overlayfs /tmp/artifact/fuse-overlayfs-ppc64le
|
||||
mv /tmp/linux_riscv64/fuse-overlayfs /tmp/artifact/fuse-overlayfs-riscv64
|
||||
- name: "SHA256SUMS"
|
||||
run: (cd /tmp/artifact; sha256sum *) | tee /tmp/SHA256SUMS
|
||||
- name: "Create release"
|
||||
@ -86,6 +78,15 @@ jobs:
|
||||
asset_path: /tmp/artifact/fuse-overlayfs-ppc64le
|
||||
asset_name: fuse-overlayfs-ppc64le
|
||||
asset_content_type: application/octet-stream
|
||||
- name: "Upload fuse-overlayfs-riscv64"
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: /tmp/artifact/fuse-overlayfs-riscv64
|
||||
asset_name: fuse-overlayfs-riscv64
|
||||
asset_content_type: application/octet-stream
|
||||
- name: "Upload SHA256SUMS"
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
env:
|
||||
|
@ -1,14 +1,16 @@
|
||||
FROM --platform=$BUILDPLATFORM debian:10 AS fuse-overlayfs
|
||||
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.1.0 AS xx
|
||||
FROM --platform=$BUILDPLATFORM ubuntu:22.04 AS fuse-overlayfs
|
||||
RUN apt-get update && \
|
||||
apt-get install --no-install-recommends -y \
|
||||
git ca-certificates libc6-dev gcc make automake autoconf pkgconf libfuse3-dev file curl go-md2man
|
||||
RUN curl -o /cross.sh https://raw.githubusercontent.com/tonistiigi/binfmt/18c3d40ae2e3485e4de5b453e8460d6872b24d6b/binfmt/scripts/cross.sh && chmod +x /cross.sh
|
||||
git make automake autoconf pkgconf file go-md2man
|
||||
COPY . /fuse-overlayfs
|
||||
WORKDIR /fuse-overlayfs
|
||||
COPY --from=xx / /
|
||||
ARG TARGETPLATFORM
|
||||
RUN /cross.sh install gcc pkgconf libfuse3-dev | sh
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN xx-apt-get install -y gcc libfuse3-dev
|
||||
RUN ./autogen.sh && \
|
||||
CC=$(/cross.sh cross-prefix)-gcc LD=$(/cross.sh cross-prefix)-ld LIBS="-ldl" LDFLAGS="-static" ./configure && \
|
||||
LIBS="-ldl" LDFLAGS="-static" ./configure --host=$(xx-info) && \
|
||||
make && mkdir /out && cp fuse-overlayfs /out && \
|
||||
file /out/fuse-overlayfs | grep "statically linked"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user