Skip to content

Commit

Permalink
Try to install libsecret for different arch
Browse files Browse the repository at this point in the history
Signed-off-by: Timothy Johnson <[email protected]>
  • Loading branch information
t1m0thyj committed Nov 1, 2023
1 parent 1522236 commit bdd9ce5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/secrets-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ jobs:
working-directory: src/secrets/src/keyring
before-script-linux: |
if command -v yum &> /dev/null; then
yum update && yum install -y libsecret-devel pkgconfig
yum update && yum install -y libsecret-devel.${{ env.CROSS_DEB_ARCH }} pkgconfig
else
apt-get update && apt-get install -y libsecret-1-dev pkg-config
dpkg --add-architecture ${{ env.CROSS_DEB_ARCH }}
apt-get update && apt-get install -y libsecret-1-dev:${{ env.CROSS_DEB_ARCH }} pkg-config
fi
- name: Upload wheels
uses: actions/upload-artifact@v3
Expand Down
19 changes: 10 additions & 9 deletions src/secrets/scripts/configure-cross.sh
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
#!/bin/bash

# Set environment variables needed for cross-compilation in current shell
# Set environment variables needed for cross-compilation in GITHUB_ENV
set_env() {
echo "CROSS_DEB_ARCH=$1" >> $GITHUB_ENV
echo "PKG_CONFIG_SYSROOT_DIR=/" >> $GITHUB_ENV
echo "RUSTFLAGS=-L $1 $RUSTFLAGS" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=$1/pkgconfig" >> $GITHUB_ENV
echo "RUSTFLAGS=-L $2 $RUSTFLAGS" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=$2/pkgconfig" >> $GITHUB_ENV
}

case "$1" in
"aarch64")
set_env "/usr/lib/aarch64-linux-gnu"
set_env arm64 "/usr/lib/aarch64-linux-gnu"
;;
"armv7")
set_env "/usr/lib/arm-linux-gnueabihf"
set_env armhf "/usr/lib/arm-linux-gnueabihf"
;;
"ppc64le")
set_env "/usr/lib/powerpc64le-unknown-linux-gnu"
set_env ppc64el "/usr/lib/powerpc64le-unknown-linux-gnu"
;;
"s390x")
set_env "/usr/lib/s390x-unknown-linux-gnu"
set_env s390x "/usr/lib/s390x-unknown-linux-gnu"
;;
"x86")
set_env "/usr/lib/i386-linux-gnu"
set_env i686 "/usr/lib/i386-linux-gnu"
;;
"x86_64")
set_env "/usr/lib/x86_64-linux-gnu"
set_env x86_64 "/usr/lib/x86_64-linux-gnu"
;;
*)
;;
Expand Down

0 comments on commit bdd9ce5

Please sign in to comment.