-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (78 loc) · 2.39 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Build and Release
on:
push:
branches: [ "fix-windows" ]
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++
- os: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run build script for Linux
if: ${{ !(matrix.os == 'windows-latest') }}
run: >
./build_samples.sh
--no-tests
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
if: ${{ matrix.os == 'windows-latest' }}
id: runvcpkg
with:
# The vcpkg.json file, which will be part of cache key computation.
vcpkgJsonGlob: '**/samples/cloudfuse_plugin/vcpkg.json'
- name: Run build script for Windows
shell: powershell
if: ${{ matrix.os == 'windows-latest' }}
run: >
.\build_samples.bat
--no-tests
--debug
- 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
shell: powershell
if: ${{ Contains(matrix.os, 'windows') }}
run: |
mkdir release
mv ..\nx-lyve-cloud-plugin-build\cloudfuse_plugin\Debug\cloudfuse_plugin.dll release\cloudfuse_plugin.dll
Compress-Archive release nx-lyve-plugin-${{ matrix.os }}.zip
- 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/*
build-windows/*