Skip to content

Commit

Permalink
Merge pull request #23 from Az-r-ow/ci
Browse files Browse the repository at this point in the history
CI update to include release files for windows
  • Loading branch information
Az-r-ow authored Mar 10, 2024
2 parents 77f5146 + 490df62 commit 82f0b17
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 12 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions .github/workflows/bump_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
- name: Bump Version and Push tag
uses: anothrNick/[email protected]
env:
DEFAULT_BUMP: "patch"
DEFAULT_BUMP: "none"
GITHUB_TOKEN: ${{ secrets.PAT }}
WITH_V: true
MAJOR_STRING_TOKEN: "major:"
MINOR_STRING_TOKEN: "minor:"
PATCH_STRING_TOKEN: "patch:"
PATCH_STRING_TOKEN: "fix:"
BRANCH_HISTORY: "compare"
27 changes: 21 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/checkout@v4

- name: Initialize Submodules
run: source ${{ env.SCRIPTS_DIR }}/init_submodules.sh
run: git submodule init && git submodule update

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand All @@ -34,28 +34,43 @@ jobs:
with:
cmakeVersion: "~3.26.0"

- name: Build
- name: Build Unix
if: ${{ matrix.os != 'windows-latest'}}
run: source ${{ env.SCRIPTS_DIR }}/build_without_tests.sh

- name: Upload .so files
- name: Build Windows
if: ${{ matrix.os == 'windows-latest' }}
run: .\${{ env.SCRIPTS_DIR }}\build_without_tests.bat

- name: Upload .so files Unix
if: ${{ matrix.os != 'windows-latest'}}
uses: actions/upload-artifact@v4
with:
name: so-file-${{ matrix.os }}-${{ matrix.python-version }}
name: dist-file-${{ matrix.os }}-${{ matrix.python-version }}
path: ${{ env.BUILD_DIR}}/*.so
if-no-files-found: error
retention-days: 1

- name: Upload Windows DDL files Windows
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/upload-artifact@v4
with:
name: dist-file-${{ matrix.os }}-${{ matrix.python-version }}
path: ${{ env.BUILD_DIR}}\*.pyd
if-no-files-found: error
retention-days: 1

release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download .so files
- name: Download distribution files
uses: actions/download-artifact@v4
with:
pattern: so-file-*
pattern: dist-file-*
path: ${{ env.BUILD_DIR }}
merge-multiple: true

Expand Down
6 changes: 6 additions & 0 deletions contribution/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ The branch name should be a one or two word max (separated with a -) name of the

For the main part following whatever's written [here](https://www.conventionalcommits.org/en/v1.0.0/) should be enough.

To bump versions, commits messages should start with :

- **Major** (eg: v1.0.0 -> v2.0.0): `major:`
- **Minor** (eg: v1.0.0 -> v1.1.0): `minor:`
- **Patch** (eg: v1.0.0 -> v1.0.1): `fix:`

### Non Functional Commit :

Non functional commits are when a feature is still under development but you had to create a commit. For example, if you're working on feature A at home on your PC, and all of a sudden you have to save you're changes so you can resume working at a Starbucks on your laptop. You create a commit with the tag : nfc(A) - A should be replaced with the name of the feature (which is the name of the branch).
Expand Down
7 changes: 7 additions & 0 deletions scripts/build_without_tests.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@echo off

mkdir build
cd build
cmake -DUNIT_TESTS=OFF ..
make all
cd ..
4 changes: 0 additions & 4 deletions scripts/init_submodules.sh

This file was deleted.

0 comments on commit 82f0b17

Please sign in to comment.