Skip to content

Commit

Permalink
Upload built library artifact from CI (#44)
Browse files Browse the repository at this point in the history
* Upload library artifact

* Fix indentation

* Fix artifact path

* Add arch to windows artifact path

* List files

* Fix file path for windows artifact

* Error when file not found and set retention period

* Group artifacts by OS

* Quotes

* Remove variable
  • Loading branch information
lewisclark authored Nov 2, 2022
1 parent 8e72404 commit a20db8e
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ jobs:
working-directory: ${{runner.workspace}}/build
shell: bash
run: ctest -V -C ${{matrix.build_type}}

- name: Rename library artifact
run: mv ${{runner.workspace}}/build/src/libgluasteal.so ${{runner.workspace}}/build/gluasteal-${{matrix.os.distro}}-gcc${{matrix.os.gcc_version}}-${{matrix.toolchain}}-${{matrix.build_type}}.so

- uses: actions/upload-artifact@v3
with:
name: "Linux"
path: ${{runner.workspace}}/build/gluasteal-${{matrix.os.distro}}-gcc${{matrix.os.gcc_version}}-${{matrix.toolchain}}-${{matrix.build_type}}.so
if-no-files-found: error
retention-days: 14
windows:
strategy:
matrix:
Expand Down Expand Up @@ -79,6 +89,16 @@ jobs:
- name: Test
working-directory: ${{runner.workspace}}/build
run: ctest -V -C ${{matrix.build_type}} --timeout 60

- name: Rename library artifact
run: move ${{runner.workspace}}/build/src/${{matrix.build_type}}/gluasteal.dll ${{runner.workspace}}/build/gluasteal-${{matrix.os.distro}}-${{matrix.arch}}-${{matrix.build_type}}.dll

- uses: actions/upload-artifact@v3
with:
name: "Windows"
path: ${{runner.workspace}}/build/gluasteal-${{matrix.os.distro}}-${{matrix.arch}}-${{matrix.build_type}}.dll
if-no-files-found: error
retention-days: 14
macos:
strategy:
matrix:
Expand Down Expand Up @@ -117,3 +137,13 @@ jobs:
shell: bash
run: ctest -V -C ${{matrix.build_type}}

- name: Rename library artifact
run: mv ${{runner.workspace}}/build/src/libgluasteal.dylib ${{runner.workspace}}/build/gluasteal-${{matrix.os.distro}}-${{matrix.toolchain}}-${{matrix.build_type}}.dylib

- uses: actions/upload-artifact@v3
with:
name: "macOS"
path: ${{runner.workspace}}/build/gluasteal-${{matrix.os.distro}}-${{matrix.toolchain}}-${{matrix.build_type}}.dylib
if-no-files-found: error
retention-days: 14

0 comments on commit a20db8e

Please sign in to comment.