1- name : SlimeVR OpenVR Driver
1+ name : Build and test OpenVR driver
22
33on : [ push, pull_request, workflow_dispatch ]
44
55jobs :
66 build :
7-
8- name : Build for ${{ matrix.os }}
7+ name : Build (${{ matrix.os }})
98 runs-on : ${{ matrix.os }}
109 strategy :
1110 fail-fast : false
@@ -70,32 +69,20 @@ jobs:
7069 - name : Build
7170 run : cmake --build "${{env.CMAKE_BUILD_DIR}}" --config Release --target "${{ matrix.target }}" -j 6 --
7271
73- - name : Upload a build artifact
72+ - name : Upload driver
7473 uses : actions/upload-artifact@v7
7574 with :
76- # Artifact name
77- name : slimevr-openvr-driver-${{ matrix.triplet }} # optional, default is artifact
78- # A file, directory or wildcard pattern that describes what to upload
79- # Using wildcards so that only the driver directory gets included (if you specify it, then it won't be included)
80- path : |
81- ${{env.CMAKE_BUILD_DIR}}/${{ matrix.release_dir }}/driver/*
82- ${{env.CMAKE_BUILD_DIR}}/${{ matrix.release_dir }}/tests*
75+ name : slimevr-openvr-driver-${{ matrix.name }}
76+ path : ${{ env.CMAKE_BUILD_DIR }}/${{ matrix.release_dir }}/driver/slimevr
8377
84- - name : Zip
85- if : startsWith(github.ref, 'refs/tags/')
86- working-directory : ${{env.CMAKE_BUILD_DIR}}/${{ matrix.release_dir }}/driver
87- run : cmake -E tar "cf" "${{env.CMAKE_BUILD_DIR}}/slimevr-openvr-driver-${{ matrix.name }}.zip" --format=zip -- ${{env.CMAKE_BUILD_DIR}}/${{ matrix.release_dir }}/driver/slimevr
88-
89- - name : Upload to draft release
90- uses : softprops/action-gh-release@v3
91- if : startsWith(github.ref, 'refs/tags/')
78+ - name : Upload tests
79+ uses : actions/upload-artifact@v7
9280 with :
93- draft : true
94- generate_release_notes : true
95- files : " ${{env.CMAKE_BUILD_DIR}}/slimevr-openvr-driver-${{ matrix.name }}.zip"
81+ name : tests-${{ matrix.name }}
82+ path : ${{ env.CMAKE_BUILD_DIR }}/${{ matrix.release_dir }}/tests*
9683
9784 test :
98- name : Run tests
85+ name : Run tests (${{ matrix.os }})
9986 needs : build
10087 runs-on : ${{ matrix.os }}
10188 strategy :
@@ -105,15 +92,17 @@ jobs:
10592 include :
10693 - os : windows-latest
10794 triplet : x64-windows-static-md
108- target : RUN_TESTS
95+ name : win64
96+ target : ALL_BUILD
10997 - os : ubuntu-latest
11098 triplet : x64-linux
111- target : test
99+ name : x64-linux
100+ target : all
112101 steps :
113102 - name : Download build artifact
114103 uses : actions/download-artifact@v8
115104 with :
116- name : slimevr-openvr-driver- ${{ matrix.triplet }}
105+ name : tests- ${{ matrix.name }}
117106 path : ${{ github.workspace }}
118107 - if : matrix.os == 'windows-latest'
119108 name : Run tests on Windows
@@ -123,3 +112,23 @@ jobs:
123112 name : Run tests on Unix
124113 working-directory : ${{ github.workspace }}/
125114 run : chmod +x ./tests && ./tests
115+
116+ upload-release :
117+ name : Upload draft release
118+ needs : [build, test]
119+ if : startsWith(github.ref, 'refs/tags/')
120+ runs-on : ubuntu-latest
121+ steps :
122+ - name : Download driver artifacts
123+ uses : actions/download-artifact@v8
124+ with :
125+ path : ${{ github.workspace }}
126+ pattern : slimevr-openvr-driver-*
127+ merge-multiple : true
128+ skip-decompress : true
129+
130+ - uses : softprops/action-gh-release@v3
131+ with :
132+ draft : true
133+ generate_release_notes : true
134+ files : slimevr-openvr-driver-*.zip
0 commit comments