Fix Eigen GIT_SHALLOW argument #46
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
name: Release | |
on: | |
push: | |
branches: [main,release-test] | |
workflow_dispatch: | |
concurrency: | |
group: build-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
# Based on https://dev.to/eugenebabichenko/automated-multi-platform-releases-with-github-actions-1abg | |
create_release: | |
name: Create Release and Provide Upload URL. | |
runs-on: ubuntu-latest # OS to create release, not for build | |
outputs: | |
# This job will provide URL for build jobs to use for uploading assets | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
steps: | |
- name: Get short SHA | |
id: get_sha | |
run: echo "sha7=$(echo ${GITHUB_SHA} | cut -c1-7)" >> $GITHUB_OUTPUT | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v.${{ steps.get_sha.outputs.sha7 }} | |
release_name: Release v.${{ steps.get_sha.outputs.sha7 }} | |
draft: false | |
prerelease: false | |
build_assets: | |
name: Build Release Assets | |
needs: create_release | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, macos-11, macos-arm64] # TODO: ubuntu18.04-arm | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: hendrikmuhs/ccache-action@v1 | |
- name: Install system dependencies (Ubuntu) | |
run: ./scripts/install_deps_ubuntu.sh | |
if: matrix.os == 'ubuntu-20.04' | |
- name: Install system dependencies (Mac) | |
run: ./scripts/install_deps_mac.sh | |
if: matrix.os == 'macos-11' || matrix.os == 'macos-arm64' | |
- name: Install venv dependencies | |
run: ./bootstrap_venv.sh | |
- name: Create Archive For Release | |
run: | | |
tar -czvf venv-${{ matrix.os }}.tar.gz venv/prefix | |
- name: Upload release assets | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create_release.outputs.upload_url }} | |
asset_name: venv-${{ matrix.os }}.tar.gz | |
asset_path: venv-${{ matrix.os }}.tar.gz | |
asset_content_type: application/x-tar |