Skip to content

Commit

Permalink
Minor fix and cleanup in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Syndace committed Nov 7, 2022
1 parent 0cbcc6a commit 0159786
Showing 1 changed file with 148 additions and 148 deletions.
296 changes: 148 additions & 148 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,166 +10,166 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3

- name: Setup MSBuild
uses: microsoft/[email protected]

- name: Download libsodium, a dependency of python-xeddsa
shell: bash
run: |
curl -o libsodium-1.0.18-stable-msvc.zip https://download.libsodium.org/libsodium/releases/libsodium-1.0.18-stable-msvc.zip
unzip libsodium-1.0.18-stable-msvc.zip
- name: Run cmake
shell: bash
run: |
export sodium_DIR="$(pwd)/libsodium/"
mkdir build/
cd build/
cmake -T host=x64 -A x64 ..
- name: Run MSBuild
run: |
cd build
msbuild libxeddsa.sln
- name: Run ctest in Debug configuration
run: |
cd build
ctest -C Debug ..
- name: Run ctest in Release configuration
run: |
cd build
ctest -C Release ..
- name: Rename the binaries
run: |
cd bin/
mv combined_static.lib libxeddsa-windows-amd64.lib
mv combined_dynamic.lib libxeddsa-windows-amd64.dll.lib
mv combined_dynamic.dll libxeddsa-windows-amd64.dll
- name: Upload the binaries
uses: actions/[email protected]
with:
name: libxeddsa-windows-amd64
path: |
bin/libxeddsa-windows-amd64.lib
bin/libxeddsa-windows-amd64.dll.lib
bin/libxeddsa-windows-amd64.dll
- uses: actions/checkout@v3

- name: Setup MSBuild
uses: microsoft/[email protected]

- name: Download libsodium
shell: bash
run: |
curl -o libsodium-1.0.18-stable-msvc.zip https://download.libsodium.org/libsodium/releases/libsodium-1.0.18-stable-msvc.zip
unzip libsodium-1.0.18-stable-msvc.zip
- name: Run cmake
shell: bash
run: |
export sodium_DIR="$(pwd)/libsodium/"
mkdir build/
cd build/
cmake -T host=x64 -A x64 ..
- name: Run MSBuild
run: |
cd build
msbuild libxeddsa.sln
- name: Run ctest in Debug configuration
run: |
cd build
ctest -C Debug ..
- name: Run ctest in Release configuration
run: |
cd build
ctest -C Release ..
- name: Rename the binaries
run: |
cd bin/
mv combined_static.lib libxeddsa-windows-amd64.lib
mv combined_dynamic.lib libxeddsa-windows-amd64.dll.lib
mv combined_dynamic.dll libxeddsa-windows-amd64.dll
- name: Upload the binaries
uses: actions/[email protected]
with:
name: libxeddsa-windows-amd64
path: |
bin/libxeddsa-windows-amd64.lib
bin/libxeddsa-windows-amd64.dll.lib
bin/libxeddsa-windows-amd64.dll
macos-amd64:
runs-on: macos-latest

steps:
- uses: actions/checkout@v3

- name: Run cmake
run: |
mkdir build/
cd build/
cmake -DFORCE_URANDOM= ..
- name: Run make
run: |
cd build/
make
- name: Run ctest
run: |
cd build/
ctest ..
- name: Rename the binaries
run: |
cd bin/
mv libcombined_static.a libxeddsa-macos-amd64.a
mv libcombined_dynamic.dylib libxeddsa-macos-amd64.dylib
- name: Upload the binaries
uses: actions/[email protected]
with:
name: libxeddsa-macos-amd64
path: |
bin/libxeddsa-macos-amd64.a
bin/libxeddsa-macos-amd64.dylib
- uses: actions/checkout@v3

- name: Run cmake
run: |
mkdir build/
cd build/
FORCE_URANDOM= cmake ..
- name: Run make
run: |
cd build/
make
- name: Run ctest
run: |
cd build/
ctest ..
- name: Rename the binaries
run: |
cd bin/
mv libcombined_static.a libxeddsa-macos-amd64.a
mv libcombined_dynamic.dylib libxeddsa-macos-amd64.dylib
- name: Upload the binaries
uses: actions/[email protected]
with:
name: libxeddsa-macos-amd64
path: |
bin/libxeddsa-macos-amd64.a
bin/libxeddsa-macos-amd64.dylib
macos-arm64:
runs-on: macos-latest

steps:
- uses: actions/checkout@v3

- name: Install libsodium, a dependency of python-xeddsa
run: |
brew uninstall --ignore-dependencies libsodium
brew fetch --force --bottle-tag=arm64_ventura libsodium | tee brew_output
downloaded_to=$(grep "Downloaded to" brew_output)
downloaded_to_split=($downloaded_to)
brew install ${downloaded_to_split[2]}
- name: Run cmake
run: |
mkdir build/
cd build/
cmake -DFORCE_URANDOM= -DCMAKE_OSX_ARCHITECTURES=arm64 ..
- name: Run make
run: |
cd build/
make
- name: Rename the binaries
run: |
cd bin/
mv libcombined_static.a libxeddsa-macos-arm64.a
mv libcombined_dynamic.dylib libxeddsa-macos-arm64.dylib
- name: Upload the binaries
uses: actions/[email protected]
with:
name: libxeddsa-macos-arm64
path: |
bin/libxeddsa-macos-arm64.a
bin/libxeddsa-macos-arm64.dylib
- uses: actions/checkout@v3

- name: Install libsodium
run: |
brew uninstall --ignore-dependencies libsodium
brew fetch --force --bottle-tag=arm64_ventura libsodium | tee brew_output
downloaded_to=$(grep "Downloaded to" brew_output)
downloaded_to_split=($downloaded_to)
brew install ${downloaded_to_split[2]}
- name: Run cmake
run: |
mkdir build/
cd build/
FORCE_URANDOM= cmake -DCMAKE_OSX_ARCHITECTURES=arm64 ..
- name: Run make
run: |
cd build/
make
- name: Rename the binaries
run: |
cd bin/
mv libcombined_static.a libxeddsa-macos-arm64.a
mv libcombined_dynamic.dylib libxeddsa-macos-arm64.dylib
- name: Upload the binaries
uses: actions/[email protected]
with:
name: libxeddsa-macos-arm64
path: |
bin/libxeddsa-macos-arm64.a
bin/libxeddsa-macos-arm64.dylib
ubuntu:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install libsodium, a dependency of python-xeddsa
run: sudo apt-get install -y libsodium-dev

- name: Run cmake
run: |
mkdir build/
cd build/
cmake -DFORCE_URANDOM= ..
- name: Run make
run: |
cd build/
make
- name: Run ctest
run: |
cd build/
ctest ..
- name: Rename the binaries
run: |
cd bin/
mv libcombined_static.a libxeddsa-linux-amd64.a
mv libcombined_dynamic.so libxeddsa-linux-amd64.so
- name: Upload the binaries
uses: actions/[email protected]
with:
name: libxeddsa-linux-amd64
path: |
bin/libxeddsa-linux-amd64.a
bin/libxeddsa-linux-amd64.so
- uses: actions/checkout@v3

- name: Install libsodium
run: sudo apt-get install -y libsodium-dev

- name: Run cmake
run: |
mkdir build/
cd build/
FORCE_URANDOM= cmake ..
- name: Run make
run: |
cd build/
make
- name: Run ctest
run: |
cd build/
ctest ..
- name: Rename the binaries
run: |
cd bin/
mv libcombined_static.a libxeddsa-linux-amd64.a
mv libcombined_dynamic.so libxeddsa-linux-amd64.so
- name: Upload the binaries
uses: actions/[email protected]
with:
name: libxeddsa-linux-amd64
path: |
bin/libxeddsa-linux-amd64.a
bin/libxeddsa-linux-amd64.so

0 comments on commit 0159786

Please sign in to comment.