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

feat: Automate SIPNET binary builds and manual release #36

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ jobs:
exit 1
fi

# upload SIPNET binaries
- name: Upload SIPNET Binaries
uses: actions/upload-artifact@v2
with:
name: sipnet-binaries
path: ./sipnet

# Run Unit Tests
test:
needs: build
Expand All @@ -87,3 +94,32 @@ jobs:
- name: Run Unit Tests
run: make testrun

# Create Release
release:
needs: build
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.sha }}
release_name: Release ${{ github.sha }}
draft: false
prerelease: false

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./sipnet
asset_name: sipnet
asset_content_type: application/octet-stream
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ DOXYFILE = docs/Doxyfile
DOXYGEN_HTML_DIR = docs/html
DOXYGEN_LATEX_DIR = docs/latex

all: estimate sipnet transpose subsetData
all: estimate sipnet transpose subsetData release

# Only update docs if source files or Doxyfile have changed
document: .doxygen.stamp
Expand All @@ -51,9 +51,15 @@ transpose: $(TRANSPOSE_OFILES)
subsetData: $(SUBSET_DATA_OFILES)
$(LD) -o subsetData $(SUBSET_DATA_OFILES) $(LIBLINKS)

release: sipnet
mkdir -p release
cp sipnet release/
tar -czvf release/sipnet.tar.gz -C release sipnet
rm release/sipnet

clean:
rm -f $(ESTIMATE_OFILES) $(SIPNET_OFILES) $(TRANSPOSE_OFILES) $(SUBSET_DATA_OFILES) estimate sensTest sipnet transpose subsetData
rm -rf $(DOXYGEN_HTML_DIR) $(DOXYGEN_LATEX_DIR)
rm -rf $(DOXYGEN_HTML_DIR) $(DOXYGEN_LATEX_DIR) release

# UNIT TESTS
SIPNET_TEST_DIRS:=$(shell find tests/sipnet -type d -mindepth 1 -maxdepth 1)
Expand Down