Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonish committed May 8, 2024
1 parent 02a7f41 commit 85102cf
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
runs-on: ubuntu-latest
container: rust:latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: cargo test --all

build-dist:
name: Build Distributions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: ./build-dist.sh
- uses: actions/checkout@v4
- run: bash -x ./build-dist.sh
46 changes: 23 additions & 23 deletions build-dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ for a in $@; do
--linux)
skip_windows="yes"
;;
--*)
echo "error: bad argument: $a"
exit 1
;;
--*)
echo "error: bad argument: $a"
exit 1
;;
*)
command="$@"
break
command="$@"
break
;;
esac
shift
Expand All @@ -49,34 +49,34 @@ cross_run() {
dockerfile="./docker/builder/Dockerfile.cross"
tag=${BUILDER_TAG:-"evebox/builder:cross"}
${ECHO} docker build \
--build-arg REAL_UID="$(id -u)" \
--build-arg REAL_GID="$(id -g)" \
--cache-from ${tag} \
-t ${tag} \
-f ${dockerfile} .
--build-arg REAL_UID="$(id -u)" \
--build-arg REAL_GID="$(id -g)" \
--cache-from ${tag} \
-t ${tag} \
-f ${dockerfile} .
${ECHO} docker run --rm ${it} --privileged \
-v "$(pwd):/src:z" \
-v /var/run/docker.sock:/var/run/docker.sock:z \
-w /src \
-e BUILD_REV="${BUILD_REV}" \
-e TARGET="${target}" \
-u builder \
--group-add $(getent group docker | cut -f3 -d:) \
${tag} $@
-v "$(pwd):/src:z" \
-v /var/run/docker.sock:/var/run/docker.sock:z \
-w /src \
-e BUILD_REV="${BUILD_REV}" \
-e TARGET="${target}" \
-u builder \
--group-add $(getent group docker | cut -f3 -d:) \
${tag} $@
}

if [[ "${command}" ]]; then
$command
else
cross_run x86_64-unknown-linux-musl make dist
cross_run aarch64-unknown-linux-musl make dist

cross_run x86_64-unknown-linux-musl ./packaging/build-rpm.sh amd64

cross_run x86_64-unknown-linux-musl ./packaging/build-deb.sh amd64
cross_run aarch64-unknown-linux-musl ./packaging/build-deb.sh arm64

if [[ "${skip_windows}" != "yes" ]]; then
cross_run x86_64-pc-windows-gnu make dist
cross_run x86_64-pc-windows-gnu make dist
fi
fi

0 comments on commit 85102cf

Please sign in to comment.