From eab0c065e6804a0fedc7c2401cf19ef3046e4640 Mon Sep 17 00:00:00 2001 From: Micha Birklbauer Date: Tue, 16 Apr 2024 13:36:12 +0200 Subject: [PATCH] add build workflows --- .github/workflows/build-macos.yml | 31 ++++++++++++++++++++++++++++++ .github/workflows/build-ubuntu.yml | 31 ++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 .github/workflows/build-macos.yml create mode 100644 .github/workflows/build-ubuntu.yml diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml new file mode 100644 index 0000000..e9ef35c --- /dev/null +++ b/.github/workflows/build-macos.yml @@ -0,0 +1,31 @@ +name: Build for macOS + +on: + workflow_dispatch: + +jobs: + Build-for-macOS: + runs-on: macos-14 + steps: + - name: Check out repository + uses: actions/checkout@v4 + - name: Install NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '6' + - name: Build CandidateSearch + run: | + dotnet publish CandidateSearch.sln --runtime osx-arm64 --self-contained --configuration Release + - name: Copy VectorSearch.dll to Release + run: | + cp dll/macos_arm/VectorSearch.dll bin/Release/net6.0/osx-arm64 + cp dll/macos_arm/VectorSearch.dll bin/Release/net6.0/osx-arm64/publish + - name: Zip Release + run: | + cd bin/ + zip -r Release.zip Release + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: release-macos-arm64-cpu-only + path: bin/Release.zip diff --git a/.github/workflows/build-ubuntu.yml b/.github/workflows/build-ubuntu.yml new file mode 100644 index 0000000..dc92a5f --- /dev/null +++ b/.github/workflows/build-ubuntu.yml @@ -0,0 +1,31 @@ +name: Build for Ubuntu 22.04 + +on: + workflow_dispatch: + +jobs: + Build-for-Ubuntu: + runs-on: ubuntu-22.04 + steps: + - name: Check out repository + uses: actions/checkout@v4 + - name: Install NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '6' + - name: Build CandidateSearch + run: | + dotnet publish CandidateSearch.sln --runtime ubuntu.22.04-x64 --self-contained --configuration Release + - name: Copy VectorSearch.dll to Release + run: | + cp dll/ubuntu_x64/VectorSearch.dll bin/Release/net6.0/ubuntu.22.04-x64 + cp dll/ubuntu_x64/VectorSearch.dll bin/Release/net6.0/ubuntu.22.04-x64/publish + - name: Zip Release + run: | + cd bin/ + zip -r Release.zip Release + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: release-ubuntu-22.04-x64-cpu-only + path: bin/Release.zip