Skip to content

Commit

Permalink
Adds release CI (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
yorik committed Sep 25, 2023
1 parent 22b62b4 commit cd51347
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build and release
on:
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build_release:
runs-on: [ubuntu-latest]
container:
image: nvidia/cuda:11.8.0-devel-ubuntu22.04
permissions:
contents: write

steps:
- name: Prepare environment
run: |
apt update && apt install -y pkg-config libssl-dev libclang-dev gcc g++ cmake git gh
- uses: actions/checkout@v3

- name: Build
run: |
cmake -B./build -DCMAKE_BUILD_TYPE=Release
cmake --build ./build
- name: Generate output with commit SHA
if: ${{ github.event_name != 'pull_request' }}
id: short_sha
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Create prerelease
if: ${{ github.event_name != 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tar -czvf bellman-cuda.tar.gz ./build
gh release create --prerelease prerelease-dev-${{ steps.short_sha.outputs.sha_short }} \
--target ${{ github.sha }} --title prerelease-dev-${{ steps.short_sha.outputs.sha_short }} \
./bellman-cuda.tar.gz

0 comments on commit cd51347

Please sign in to comment.