From 1d9cf8e17e3e2e602cff57482f1a11dd47592a96 Mon Sep 17 00:00:00 2001 From: James Fantin-Hardesty <24646452+jfantinhardesty@users.noreply.github.com> Date: Tue, 11 Jun 2024 10:29:26 -0600 Subject: [PATCH] Add release process (#12) * Rename plugin and cleanup some of cmake * Don't hardcode bucketname, let cloudfuse select first bucket * Add compiler flags, fix warnings * Add action to build using cmake * Test on GitHub * Fix builds * Fix builds * Don't run unit tests * Don't run unit tests * Include missing header * Add missing header * Add missing header * Add ubuntu 24.04 * Fix some warnings * Fix error * Cleanup for merge * Add fuse allow other script * Add release action * Test action * Remove accidental file * Run on tagged versions * Fix names * Fix build * Fix release build names * Try to fix names * Try to fix names for real * Try to fix names for release * Debug release * More debugging * Cleanup debug --- .github/workflows/release.yml | 68 +++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..292d8e8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,68 @@ +name: Build and Release + +on: + push: + tags: + - 'v*' + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: ubuntu-22.04 + c_compiler: gcc + cpp_compiler: g++ + - os: ubuntu-20.04 + c_compiler: gcc + cpp_compiler: g++ + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run build script + run: > + ./build_samples.sh + --no-tests + -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} + -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} + + - name: Package Artifacts Linux + if: ${{ Contains(matrix.os, 'ubuntu') }} + run: | + mkdir release + mv ../nx-lyve-cloud-plugin-build/cloudfuse_plugin/*.so release/cloudfuse_plugin.so + cp ./setup_fuse_allow_other.sh release/ + zip -r nx-lyve-plugin-${{ matrix.os }}.zip release + + - name: Package Artifacts Windows + if: ${{ Contains(matrix.os, 'windows') }} + run: | + mkdir release + mv ../nx-lyve-cloud-plugin-build/cloudfuse_plugin/*.dll release/cloudfuse_plugin.dll + zip -r nx-lyve-plugin-${{ matrix.os }}.zip release + + - name: Archive production artifacts Ubuntu + uses: actions/upload-artifact@v4 + with: + name: build-${{ matrix.os }} + path: ./nx-lyve-plugin-${{ matrix.os }}.zip + if-no-files-found: error + + release: + needs: build + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Download all workflow run artifacts + uses: actions/download-artifact@v4 + + - name: Release + uses: softprops/action-gh-release@v2 + with: + files: | + build-ubuntu-20.04/* + build-ubuntu-22.04/*