Skip to content

Add FP16 support

Add FP16 support #2

Workflow file for this run

name: "Bump Version"
on:
pull_request:
types:
- opened
- edited
- synchronize
branches:
- master
permissions:
contents: write
jobs:
main:
name: Bump Version
runs-on: [self-hosted, Linux]
steps:
- uses: actions/checkout@v3
- name: Bump Version
run: |
set -x
if [[ "$GITHUB_BASE_REF" == "" ]]; then
exit 0
fi
if [[ "$GITHUB_HEAD_REF" == "" ]]; then
exit 0
fi
# get the old version from our target branch
git fetch origin "${GITHUB_BASE_REF}"
git fetch origin "${GITHUB_HEAD_REF}"
# need to be on a branch to commit
git checkout "origin/${GITHUB_HEAD_REF}" -B "${GITHUB_HEAD_REF}"
git pull
OLD_VERSION=$(
git cat-file blob origin/${GITHUB_BASE_REF}:Cargo.toml |
grep '^version = ' |
cut -d '"' -f 2
)
# get current version
CURR_VERSION=$(
cat Cargo.toml |
grep '^version = ' |
cut -d '"' -f 2
)
if [[ "$OLD_VERSION" != "$CURR_VERSION" ]]; then
echo "Version already updated, old: $OLD_VERSION, new: $CURR_VERSION"
exit 0
fi
NEXT_VERSION=$(echo "${OLD_VERSION}" | awk -F. -v OFS=. '{$NF += 1 ; print}')
sed -i Cargo.toml -e "s/^version = \"$CURR_VERSION\"/version = \"$NEXT_VERSION\"/"
git config user.email "[email protected]"
git config user.name "anduril-ci"
git add Cargo.toml
git commit -m "New Version: ${NEXT_VERSION}"
git push