Skip to content

Commit

Permalink
Double quote, maybe?
Browse files Browse the repository at this point in the history
  • Loading branch information
OoLunar committed May 24, 2024
1 parent cba2022 commit 7e19ea3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
11 changes: 7 additions & 4 deletions .github/scripts/package-opus.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#!/bin/bash

# Do NOT exit on error
set +e

# Create Sodium dir
mkdir -p "$WORKSPACE/libs/opus"
cd "$WORKSPACE/libs/opus"
Expand All @@ -24,13 +21,19 @@ cmake --build build --config Release

EXPORT_DIR="$WORKSPACE/libs/libopus/$RID/native/"

# Do NOT exit on error
set +e

# Check if the output file has changed, since sometimes Git struggles on Windows
cmp --silent "build/$FIND_FILE" "$EXPORT_DIR/$FILE"
cmp --silent build/$FIND_FILE "$EXPORT_DIR/$FILE"
if [ $? -eq 0 ]; then
echo 'No changes detected'
exit 0
fi

# Exit on error
set -e

# Move the output file to the correct location
mkdir -p "$EXPORT_DIR"
rm -f "$EXPORT_DIR/$FILE"
Expand Down
9 changes: 6 additions & 3 deletions .github/scripts/package-sodium.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#!/bin/bash

# Do NOT exit on error
set +e

# Create Sodium dir
mkdir -p "$WORKSPACE/libs/sodium"
cd "$WORKSPACE/libs/sodium"
Expand All @@ -22,13 +19,19 @@ git checkout "$SODIUM_VERSION"
$COMMAND
EXPORT_DIR="$WORKSPACE/libs/libsodium/$RID/native/"

# Do NOT exit on error
set +e

# Check if the output file has changed, since sometimes Git struggles on Windows
cmp --silent "$OUTPUT_FILE" "$EXPORT_DIR/$FILE"
if [ $? -eq 0 ]; then
echo 'No changes detected'
exit 0
fi

# Exit on error
set -e

# Move the output file to the correct location
mkdir -p "$EXPORT_DIR"
rm -f "$EXPORT_DIR/$FILE"
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/opus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
install-deps: "sudo apt-get update && sudo apt-get -y install autoconf automake libtool cmake make \
&& wget https://musl.cc/x86_64-linux-musl-cross.tgz \
&& tar xzf x86_64-linux-musl-cross.tgz \
&& export PATH=\"$(pwd)/x86_64-linux-musl-cross/bin:$PATH\" \
&& export PATH=\\\"$(pwd)/x86_64-linux-musl-cross/bin:$PATH\\\" \
&& export CC=x86_64-linux-musl-gcc \
&& alias gcc=x86_64-linux-musl-gcc",
args: "",
Expand All @@ -63,7 +63,7 @@ jobs:
install-deps: "sudo apt-get update && sudo apt-get -y install autoconf automake libtool cmake make \
&& wget https://musl.cc/aarch64-linux-musl-cross.tgz \
&& tar xzf aarch64-linux-musl-cross.tgz \
&& export PATH=\"$(pwd)/aarch64-linux-musl-cross/bin:$PATH\" \
&& export PATH=\\\"$(pwd)/aarch64-linux-musl-cross/bin:$PATH\\\" \
&& export CC=aarch64-linux-musl-gcc \
&& alias gcc=aarch64-linux-musl-gcc",
args: "",
Expand All @@ -73,32 +73,32 @@ jobs:
}
- {
os: macos-latest,
install-deps: "brew install autoconf automake libtool gcc cmake make && export PATH=\"/usr/local/opt/make/libexec/gnubin:$PATH\"",
install-deps: "brew install autoconf automake libtool gcc cmake make && export PATH=\\\"/usr/local/opt/make/libexec/gnubin:$PATH\\\"",
args: "",
find-file: "libopus.*.*.*.dylib",
file: "libopus.dylib",
rid: "osx-x64"
}
- {
os: macos-latest,
install-deps: "brew install autoconf automake libtool gcc cmake make && export PATH=\"/usr/local/opt/make/libexec/gnubin:$PATH\"",
install-deps: "brew install autoconf automake libtool gcc cmake make && export PATH=\\\"/usr/local/opt/make/libexec/gnubin:$PATH\\\"",
args: "-DCMAKE_OSX_ARCHITECTURES=arm64",
find-file: "libopus.*.*.*.dylib",
file: "libopus.dylib",
rid: "osx-arm64"
}
- {
os: macos-latest,
install-deps: "brew install autoconf automake libtool gcc cmake make && export PATH=\"/usr/local/opt/make/libexec/gnubin:$PATH\"",
args: "-G \"Unix Makefiles\" -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64",
install-deps: "brew install autoconf automake libtool gcc cmake make && export PATH=\\\"/usr/local/opt/make/libexec/gnubin:$PATH\\\"",
args: "-G \\\"Unix Makefiles\\\" -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64",
find-file: "libopus.*.*.*.dylib",
file: "libopus.dylib",
rid: "ios-arm64"
}
- {
os: windows-latest,
install-deps: "",
args: "-G \"Visual Studio 17 2022\" -A Win32",
args: "-G \\\"Visual Studio 17 2022\\\" -A Win32",
find-file: "Release/opus.dll",
file: "opus.dll",
rid: "win-x86",
Expand All @@ -107,7 +107,7 @@ jobs:
- {
os: windows-latest,
install-deps: "",
args: "-G \"Visual Studio 17 2022\" -A x64",
args: "-G \\\"Visual Studio 17 2022\\\" -A x64",
find-file: "Release/opus.dll",
file: "opus.dll",
rid: "win-x64",
Expand All @@ -116,7 +116,7 @@ jobs:
- {
os: windows-latest,
install-deps: "",
args: "-G \"Visual Studio 17 2022\" -A ARM64",
args: "-G \\\"Visual Studio 17 2022\\\" -A ARM64",
find-file: "Release/opus.dll",
file: "opus.dll",
rid: "win-arm64",
Expand Down Expand Up @@ -158,6 +158,6 @@ jobs:
with:
add: "libs/libopus/"
default_author: github_actions
message: Update ${{ matrix.config.file }} to ${{ env.OPUS_VERSION }}
message: Update ${{ matrix.config.rid }} to ${{ env.OPUS_VERSION }}
pull: "--rebase --autostash"
push: true

0 comments on commit 7e19ea3

Please sign in to comment.