Release #80
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Apache License 2.0 | |
name: Release | |
on: | |
release: | |
types: [published] | |
env: | |
PROJECT_NAME: open-space-toolkit-astrodynamics | |
jobs: | |
prepare-environment: | |
name: Prepare Environment Variables | |
runs-on: ubuntu-latest | |
outputs: | |
project_name: ${{ steps.project-name.outputs.value }} | |
project_version: ${{ steps.project-version.outputs.value }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
lfs: true | |
- id: project-name | |
name: Get Project Name | |
run: | | |
echo "Project name: ${{ env.PROJECT_NAME }}" | |
echo "value=${{ env.PROJECT_NAME }}" >> $GITHUB_OUTPUT | |
- id: project-version | |
name: Get Project Version | |
run: | | |
project_version=$(git describe --tags --always) | |
echo "Project version: ${project_version}" | |
echo "value=${project_version}" >> $GITHUB_OUTPUT | |
build-development-image: | |
name: Build Development Image | |
needs: | |
- prepare-environment | |
uses: open-space-collective/open-space-toolkit/.github/workflows/build-image.yml@main | |
with: | |
project_name: ${{ needs.prepare-environment.outputs.project_name }} | |
project_version: ${{ needs.prepare-environment.outputs.project_version }} | |
secrets: inherit | |
test: | |
name: Test | |
needs: | |
- prepare-environment | |
- build-development-image | |
uses: open-space-collective/open-space-toolkit/.github/workflows/test.yml@main | |
with: | |
project_name: ${{ needs.prepare-environment.outputs.project_name }} | |
project_version: ${{ needs.prepare-environment.outputs.project_version }} | |
secrets: inherit | |
package: | |
name: Package | |
needs: | |
- prepare-environment | |
- build-development-image | |
- test | |
uses: open-space-collective/open-space-toolkit/.github/workflows/build-packages.yml@main | |
with: | |
project_name: ${{ needs.prepare-environment.outputs.project_name }} | |
project_version: ${{ needs.prepare-environment.outputs.project_version }} | |
secrets: inherit | |
benchmark-cpp: | |
name: Benchmark C++ | |
runs-on: ubuntu-latest | |
needs: | |
- prepare-environment | |
- build-development-image | |
- test | |
- package | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
lfs: true | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Pull Development Image | |
run: docker pull openspacecollective/${{ needs.prepare-environment.outputs.project_name }}-development:${{ needs.prepare-environment.outputs.project_version }} | |
- name: Run C++ Benchmark | |
run: make benchmark-cpp-standalone | |
- name: Download previous benchmark | |
uses: actions/cache@v1 | |
with: | |
path: ./cache | |
key: ${{ runner.os }}-benchmark | |
- uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
tool: 'googlecpp' | |
output-file-path: bin/benchmark_result.json | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
auto-push: ${{ github.ref == 'refs/heads/main' }} | |
alert-threshold: "200%" | |
comment-on-alert: true | |
validation-cpp: | |
name: Run C++ Validation Tests | |
runs-on: ubuntu-latest | |
needs: | |
- prepare-environment | |
- build-development-image | |
- test | |
- package | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
lfs: true | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Pull Development Image | |
run: docker pull openspacecollective/${{ needs.prepare-environment.outputs.project_name }}-development:${{ needs.prepare-environment.outputs.project_version }} | |
- name: Run C++ Validation Tests | |
run: make validation-cpp-standalone | |
release: | |
name: Release | |
needs: | |
- prepare-environment | |
- build-development-image | |
- test | |
- package | |
- benchmark-cpp | |
- validation-cpp | |
uses: open-space-collective/open-space-toolkit/.github/workflows/release.yml@main | |
with: | |
project_name: ${{ needs.prepare-environment.outputs.project_name }} | |
project_version: ${{ needs.prepare-environment.outputs.project_version }} | |
secrets: inherit |