diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9d2b0501f7..e43c5b783b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -28,14 +28,10 @@ jobs: - run: | sudo mv release-* /tmp/artifact - sudo mv /tmp/artifact/crun-*-linux-amd64 /tmp/artifact/crun-linux-amd64 - sudo mv /tmp/artifact/crun-*-linux-amd64-disable-systemd /tmp/artifact/crun-linux-amd64-disable-systemd - sudo mv /tmp/artifact/crun-*-linux-arm64 /tmp/artifact/crun-linux-arm64 - sudo mv /tmp/artifact/crun-*-linux-arm64-disable-systemd /tmp/artifact/crun-linux-arm64-disable-systemd - sudo mv /tmp/artifact/crun-*-linux-ppc64le /tmp/artifact/crun-linux-ppc64le - sudo mv /tmp/artifact/crun-*-linux-ppc64le-disable-systemd /tmp/artifact/crun-linux-ppc64le-disable-systemd - sudo mv /tmp/artifact/crun-*-linux-riscv64 /tmp/artifact/crun-linux-riscv64 - sudo mv /tmp/artifact/crun-*-linux-riscv64-disable-systemd /tmp/artifact/crun-linux-riscv64-disable-systemd + for ARCH in amd64 arm64 ppc64le riscv64; do + sudo mv /tmp/artifact/crun-*-linux-${ARCH} /tmp/artifact/crun-linux-${ARCH} + sudo mv /tmp/artifact/crun-*-linux-${ARCH}-disable-systemd /tmp/artifact/crun-linux-${ARCH}-disable-systemd + done sudo mv /tmp/artifact/*.tar.gz /tmp/artifact/crun.tar.gz sudo mv /tmp/artifact/*.tar.xz /tmp/artifact/crun.tar.xz (cd /tmp/artifact; sha256sum * | sudo tee CHECKSUMS) diff --git a/build-aux/release.sh b/build-aux/release.sh index 60563d0418..87c6d6d9b5 100755 --- a/build-aux/release.sh +++ b/build-aux/release.sh @@ -45,53 +45,19 @@ mkdir -p /nix NIX_ARGS="--extra-experimental-features nix-command --print-build-logs --option cores $(nproc) --option max-jobs $(nproc)" -$RUNTIME run --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \ - nix $NIX_ARGS build --file nix/ -cp ./result/bin/crun $OUTDIR/crun-$VERSION-linux-amd64 +for ARCH in amd64 arm64 ppc64le riscv64; do + $RUNTIME run --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \ + nix $NIX_ARGS build --file nix/default-${ARCH}.nix + cp ./result/bin/crun $OUTDIR/crun-$VERSION-linux-${ARCH} -rm -rf result + rm -rf result -$RUNTIME run --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \ - nix $NIX_ARGS build --file nix/ --arg enableSystemd false -cp ./result/bin/crun $OUTDIR/crun-$VERSION-linux-amd64-disable-systemd + $RUNTIME run --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \ + nix $NIX_ARGS build --file nix/default-${ARCH}.nix --arg enableSystemd false + cp ./result/bin/crun $OUTDIR/crun-$VERSION-linux-${ARCH}-disable-systemd -rm -rf result - -$RUNTIME run --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \ - nix $NIX_ARGS build --file nix/default-arm64.nix -cp ./result/bin/crun $OUTDIR/crun-$VERSION-linux-arm64 - -rm -rf result - -$RUNTIME run --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \ - nix $NIX_ARGS build --file nix/default-arm64.nix --arg enableSystemd false -cp ./result/bin/crun $OUTDIR/crun-$VERSION-linux-arm64-disable-systemd - -rm -rf result - -$RUNTIME run --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \ - nix $NIX_ARGS build --file nix/default-ppc64le.nix -cp ./result/bin/crun $OUTDIR/crun-$VERSION-linux-ppc64le - -rm -rf result - -$RUNTIME run --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \ - nix $NIX_ARGS build --file nix/default-ppc64le.nix --arg enableSystemd false -cp ./result/bin/crun $OUTDIR/crun-$VERSION-linux-ppc64le-disable-systemd - -rm -rf result - -$RUNTIME run --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \ - nix $NIX_ARGS build --file nix/default-riscv64.nix -cp ./result/bin/crun $OUTDIR/crun-$VERSION-linux-riscv64 - -rm -rf result - -$RUNTIME run --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \ - nix $NIX_ARGS build --file nix/default-riscv64.nix --arg enableSystemd false -cp ./result/bin/crun $OUTDIR/crun-$VERSION-linux-riscv64-disable-systemd - -rm -rf result + rm -rf result +done if test x$SKIP_GPG = x; then for i in $OUTDIR/*; do diff --git a/nix/default.nix b/nix/default-amd64.nix similarity index 100% rename from nix/default.nix rename to nix/default-amd64.nix