Skip to content

Commit

Permalink
CI: Upload install results as artifacts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Feb 24, 2023
1 parent 40a84ee commit d59c8b7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/Emscripten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,22 @@ jobs:
embuilder.py build sdl2 sdl2-image-jpg sdl2-net
cmake --build . --config $BUILD_TYPE -j 2
- name: Prepare Site
run: |
mkdir -p site/examples
cp ../build/examples/*/*.{js,wasm} site/examples
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ${{github.event.repository.name}}-${{github.sha}}-web
path: site

# build the docs
- name: Build Docs
run: |
cd 32blit && doxygen doxygen.conf && cd ..
cp -r 32blit/documentation/html/* site
cp ../build/examples/*/*.{js,wasm} site/examples
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/master' # github.event_name == 'release'
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
runs-on: ${{matrix.os}}

env:
RELEASE_FILE: ${{github.event.repository.name}}-${{github.event.release.tag_name}}-${{matrix.release-suffix}}
RELEASE_FILE: ${{github.event.repository.name}}-${{github.event.release.tag_name || github.sha}}-${{matrix.release-suffix}}

steps:
- name: Checkout 32Blit SDK
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCPACK_PACKAGE_FILE_NAME=${{env.RELEASE_FILE}} ${{matrix.cmake-args}}
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=`pwd`/install -DCPACK_PACKAGE_FILE_NAME=${{env.RELEASE_FILE}} ${{matrix.cmake-args}}

# Problem matching
- if: runner.os != 'Windows'
Expand All @@ -152,6 +152,20 @@ jobs:
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# run: ctest -C $BUILD_TYPE

- name: Prepare Artifact
if: github.event_name != 'release'
working-directory: ${{runner.workspace}}/build
shell: bash
run: |
cmake --build . --config $BUILD_TYPE --target install
- name: Upload Artifact
if: github.event_name != 'release'
uses: actions/upload-artifact@v3
with:
name: ${{env.RELEASE_FILE}}
path: ${{runner.workspace}}/build/install

- name: Package Release
if: github.event_name == 'release' && matrix.release-suffix != ''
shell: bash
Expand Down

0 comments on commit d59c8b7

Please sign in to comment.