Skip to content
Open

nyx #132

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
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: Aeos Build
name: Nyx Build

on:
push:
branches: ["aeos"]
branches: ["nyx"]
pull_request:
branches: ["aeos"]
branches: ["nyx"]

jobs:
setup:
runs-on: ubuntu-latest
outputs:
aeos_version_major: ${{ steps.set_version.outputs.aeos_version_major }}
aeos_version_minor: ${{ steps.set_version.outputs.aeos_version_minor }}
aeos_build_number: ${{ steps.set_version.outputs.aeos_build_number }}
aeos_version_number: ${{ steps.set_version.outputs.aeos_version_number }}
nyx_version_major: ${{ steps.set_version.outputs.nyx_version_major }}
nyx_version_minor: ${{ steps.set_version.outputs.nyx_version_minor }}
nyx_build_number: ${{ steps.set_version.outputs.nyx_build_number }}
nyx_version_number: ${{ steps.set_version.outputs.nyx_version_number }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -23,8 +23,8 @@ jobs:
run: |
# Fetch all tags
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
# Get the latest tag that matches the aeos prefix
TAG_PREFIX="aeos-"
# Get the latest tag that matches the nyx prefix
TAG_PREFIX="nyx-"
LATEST_TAG=$(git tag --list "${TAG_PREFIX}*" | sort -V | tail -n1)
if [ -z "$LATEST_TAG" ]; then
echo "No matching tags found. Setting default version."
Expand All @@ -33,18 +33,18 @@ jobs:
BUILD_NUMBER="0"
else
echo "Found latest tag: $LATEST_TAG"
VERSION_NUMBER=$(echo $LATEST_TAG | sed "s/aeos-//g")
VERSION_NUMBER=$(echo $LATEST_TAG | sed "s/nyx-//g")
VERSION_MAJOR=$(echo $VERSION_NUMBER | cut -d. -f1)
VERSION_MINOR=$(echo $VERSION_NUMBER | cut -d. -f2)
LAST_BUILD_NUMBER=$(echo $VERSION_NUMBER | cut -d. -f3)
COMMITS_SINCE_TAG=$(git rev-list --count $LATEST_TAG..HEAD)
BUILD_NUMBER=$(( $LAST_BUILD_NUMBER + $COMMITS_SINCE_TAG ))
fi
FULL_VERSION="$VERSION_MAJOR.$VERSION_MINOR.$BUILD_NUMBER"
echo "aeos_version_major=$VERSION_MAJOR" >> $GITHUB_OUTPUT
echo "aeos_version_minor=$VERSION_MINOR" >> $GITHUB_OUTPUT
echo "aeos_build_number=$BUILD_NUMBER" >> $GITHUB_OUTPUT
echo "aeos_version_number=$FULL_VERSION" >> $GITHUB_OUTPUT
echo "nyx_version_major=$VERSION_MAJOR" >> $GITHUB_OUTPUT
echo "nyx_version_minor=$VERSION_MINOR" >> $GITHUB_OUTPUT
echo "nyx_build_number=$BUILD_NUMBER" >> $GITHUB_OUTPUT
echo "nyx_version_number=$FULL_VERSION" >> $GITHUB_OUTPUT
echo "Version Number: $FULL_VERSION"

build:
Expand Down Expand Up @@ -102,10 +102,10 @@ jobs:
working-directory: HeliosEmbedded
- name: Build Binary
run: |
export HELIOS_VERSION_MAJOR=${{ needs.setup.outputs.aeos_version_major }}
export HELIOS_VERSION_MINOR=${{ needs.setup.outputs.aeos_version_minor }}
export HELIOS_BUILD_NUMBER=${{ needs.setup.outputs.aeos_build_number }}
export HELIOS_VERSION_NUMBER=${{ needs.setup.outputs.aeos_version_number }}
export HELIOS_VERSION_MAJOR=${{ needs.setup.outputs.nyx_version_major }}
export HELIOS_VERSION_MINOR=${{ needs.setup.outputs.nyx_version_minor }}
export HELIOS_BUILD_NUMBER=${{ needs.setup.outputs.nyx_build_number }}
export HELIOS_VERSION_NUMBER=${{ needs.setup.outputs.nyx_version_number }}
make -j build
working-directory: HeliosEmbedded
- name: Archive HeliosEmbedded artifacts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Aeos Release
name: Nyx Release

on:
workflow_dispatch: # manual trigger
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Checkout current repository
uses: actions/checkout@v4
with:
ref: aeos # Explicitly checkout the aeos branch
ref: nyx # Explicitly checkout the nyx branch
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -79,22 +79,22 @@ jobs:
- name: Checkout current repository
uses: actions/checkout@v4
with:
ref: aeos # Explicitly checkout the aeos branch
ref: nyx # Explicitly checkout the nyx branch
fetch-depth: 0 # Fetch all history for calculating version

- name: Get the latest tag
id: get_tag
run: |
# Look for tags with the aeos- prefix
latest_tag=$(git tag --list "aeos-*" | sort -V | tail -n1 || echo "none")
# Look for tags with the nyx- prefix
latest_tag=$(git tag --list "nyx-*" | sort -V | tail -n1 || echo "none")
echo "tag=$latest_tag" >> $GITHUB_ENV

- name: Check for existing tags
id: check_tag
run: |
if [ "${{ env.tag }}" == "none" ]; then
echo "No aeos tags found. Creating initial tag aeos-1.0.0."
echo "new_tag=aeos-1.0.0" >> $GITHUB_ENV
echo "No nyx tags found. Creating initial tag nyx-1.0.0."
echo "new_tag=nyx-1.0.0" >> $GITHUB_ENV
fi

- name: Calculate new version
Expand All @@ -104,17 +104,17 @@ jobs:
latest_tag=${{ env.tag }}
commits_since_tag=$(git rev-list $latest_tag..HEAD --count)

# Extract version number from the aeos tag
version_number=$(echo $latest_tag | sed "s/aeos-//g")
# Extract version number from the nyx tag
version_number=$(echo $latest_tag | sed "s/nyx-//g")

IFS='.' read -ra ADDR <<< "$version_number"
patch=$((ADDR[2] + commits_since_tag))
new_version="${ADDR[0]}.${ADDR[1]}.$patch"
echo "new_version=$new_version" >> $GITHUB_ENV
echo "new_tag=aeos-$new_version" >> $GITHUB_ENV
echo "new_tag=nyx-$new_version" >> $GITHUB_ENV
else
# Extract version number from the new tag
new_version=$(echo ${{ env.new_tag }} | sed "s/aeos-//g")
new_version=$(echo ${{ env.new_tag }} | sed "s/nyx-//g")
echo "new_version=$new_version" >> $GITHUB_ENV
fi

Expand Down Expand Up @@ -161,9 +161,9 @@ jobs:
uses: ncipollo/release-action@v1
with:
tag: ${{ env.new_tag }}
name: Aeos ${{ env.new_version }}
name: Nyx ${{ env.new_version }}
body: |
Release of Aeos version ${{ env.new_version }}
Release of Nyx version ${{ env.new_version }}
draft: false
prerelease: false
env:
Expand All @@ -174,7 +174,7 @@ jobs:
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifact/unzipped/embedded/helios.bin
asset_name: aeos.bin
asset_name: nyx.bin
asset_content_type: application/octet-stream
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -184,7 +184,7 @@ jobs:
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifact/unzipped/embedded/helios.elf
asset_name: aeos.elf
asset_name: nyx.elf
asset_content_type: application/octet-stream
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -194,7 +194,7 @@ jobs:
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifact/unzipped/embedded/helios.map
asset_name: aeos.map
asset_name: nyx.map
asset_content_type: application/octet-stream
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -204,7 +204,7 @@ jobs:
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifact/unzipped/embedded/helios.hex
asset_name: aeos.hex
asset_name: nyx.hex
asset_content_type: application/octet-stream
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -214,7 +214,7 @@ jobs:
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifact/unzipped/helioscli/helios
asset_name: aeos_cli
asset_name: nyx_cli
asset_content_type: application/octet-stream
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,3 @@


!*.test

!*.conf
Loading
Loading