Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automatic calendar-versioning based releases #935

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,26 @@ jobs:
run: sudo xargs apt-get install -y < .github/workflows/apt-packages.txt

- run: ci-tests/test-spike

- name: Calendar versioning Release
uses: StephaneBour/actions-calver@master
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who is StephaneBour?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The github action file is provided by that user : https://github.com/StephaneBour/actions-calver

id: calver
with:
date_format: "%Y-%m-%d"
release: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
id: create_release
if: github.ref == 'refs/heads/master'
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
release_branch: refs/heads/master
release_name: ${{ steps.calver.outputs.release }}
tag_name: ${{ steps.calver.outputs.release }}
draft: false
prerelease: false

1 change: 0 additions & 1 deletion VERSION

This file was deleted.

3 changes: 3 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@
/* Define if subproject MCPPBS_SPROJ_NORM is enabled */
#undef SPIKE_MAIN_ENABLED

/* Define version of spike installed */
#undef SPIKE_VERSION

/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS

Expand Down
6 changes: 6 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -6423,6 +6423,12 @@ ac_config_files="$ac_config_files riscv-fesvr.pc"

ac_config_files="$ac_config_files riscv-disasm.pc"

SPIKE_VERSION=`git describe --tags --dirty`

cat >>confdefs.h <<_ACEOF
#define SPIKE_VERSION "$SPIKE_VERSION"
_ACEOF

cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
Expand Down
4 changes: 4 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,8 @@ AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([riscv-fesvr.pc])
AC_CONFIG_FILES([riscv-disasm.pc])
SPIKE_VERSION=`git describe --tags --dirty`
AC_DEFINE_UNQUOTED([SPIKE_VERSION],
["$SPIKE_VERSION"],
[Define version of spike installed])
AC_OUTPUT
1 change: 0 additions & 1 deletion spike_main/spike.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <string>
#include <memory>
#include <fstream>
#include "../VERSION"

static void help(int exit_code = 1)
{
Expand Down