diff --git a/.github/scripts/package-opus.sh b/.github/scripts/package-opus.sh index 406dc5d..0bd8c3d 100644 --- a/.github/scripts/package-opus.sh +++ b/.github/scripts/package-opus.sh @@ -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" @@ -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" diff --git a/.github/scripts/package-sodium.sh b/.github/scripts/package-sodium.sh index 3ddbbe6..e188ace 100644 --- a/.github/scripts/package-sodium.sh +++ b/.github/scripts/package-sodium.sh @@ -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" @@ -22,6 +19,9 @@ 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 @@ -29,6 +29,9 @@ if [ $? -eq 0 ]; then 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" diff --git a/.github/workflows/opus.yml b/.github/workflows/opus.yml index 652666d..dd625d6 100644 --- a/.github/workflows/opus.yml +++ b/.github/workflows/opus.yml @@ -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: "", @@ -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: "", @@ -73,7 +73,7 @@ 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", @@ -81,7 +81,7 @@ 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: "-DCMAKE_OSX_ARCHITECTURES=arm64", find-file: "libopus.*.*.*.dylib", file: "libopus.dylib", @@ -89,8 +89,8 @@ jobs: } - { 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" @@ -98,7 +98,7 @@ jobs: - { 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", @@ -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", @@ -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", @@ -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 \ No newline at end of file