Compare commits

...

4 Commits

Author SHA1 Message Date
sappho
9a7e06e738
Merge 5fbbe981f1 into 38f7e5d6f2 2025-09-26 17:16:16 +00:00
sappho
5fbbe981f1
correct .zip name format to match current limetech builds 2025-09-26 13:16:14 -04:00
sappho
a05a9308f0
SM_VERSION scraping 2025-09-26 13:12:46 -04:00
sappho
3f8e2159d9
remove cruft 2025-09-26 12:59:00 -04:00

View File

@ -60,9 +60,13 @@ jobs:
shell: bash
run: |
echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
echo ${{ env.SHORT_SHA }}
- name: scrape version and export to env
shell: bash
run: |
echo "SM_VERSION=`cat ./extension/version.h | grep "#define SM_VERSION" | cut -f 2 -d '"'`" >> $GITHUB_ENV
echo ${{ env.SM_VERSION }}
- name: Linux dependencies
if: startsWith(runner.os, 'Linux')
run: |
@ -73,7 +77,6 @@ jobs:
libc6-dev libc6-dev-i386 linux-libc-dev \
linux-libc-dev:i386 lib32z1-dev \
zlib1g-dev:i386 zlib1g-dev \
tree \
${{ inputs.cc }}
- name: Select clang compiler
@ -108,18 +111,21 @@ jobs:
mkdir -p build && cd build
python ../configure.py --enable-optimize
ambuild
ZIP_FILENAME="${{ env.PROJECT }}-${{ env.SHORT_SHA }}-${{ env.PROJECT_OS }}.zip"
# e.g. accelerator-2.6.0-abcdefg-windows.zip
ZIP_FILENAME="${{ env.PROJECT }}-${{ env.SM_VERSION }}-${{ env.SHORT_SHA }}-${{ env.PROJECT_OS }}.zip"
echo ${ZIP_FILENAME}
echo "ZIP_FILENAME=${ZIP_FILENAME}" >> $GITHUB_ENV
# github upload
- name: Upload release to GitHub
if: ${{ inputs.upload }}
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.upload-artifact-name }}
path: build/package
retention-days: 14
#- name: Upload package
# if: ${{ inputs.upload }}
# uses: actions/upload-artifact@v4
# with:
# name: ${{ inputs.upload-artifact-name }}
# path: build/package
- name: Package release - Windows
if: ${{ startsWith(env.PROJECT_OS, 'windows-latest') }}
# shell: pwsh
@ -135,35 +141,19 @@ jobs:
zip -r "${{ env.ZIP_FILENAME }}" .
cp "${{ env.ZIP_FILENAME }}" "${{ matrix.os }}_${{ matrix.cc }}_${{ env.ZIP_FILENAME }}"
- name: Upload release
# limetech upload
- name: Upload release to limetech
# if: github.event_name == 'push' && github.ref == 'refs/heads/master'
shell: bash
working-directory: build/package
run: |
pwd
ls "${{ env.ZIP_FILENAME }}" || true
echo "Begin upload..."
AUTHORIZATION="$(echo -n '${{ secrets.USERNAME }}:${{ secrets.PASSWORD }}' | base64)"
echo "::add-mask::${AUTHORIZATION}"
HTTP_CODE=$(curl -XPOST -H "Authorization: Basic ${AUTHORIZATION}" -H "Content-Type: application/zip" --output /dev/null --silent --write-out "%{http_code}" --data-binary "@${{ env.ZIP_FILENAME }}" "https://builds.limetech.io/upload.php?project=${{ env.PROJECT }}&filename=${{ env.ZIP_FILENAME }}")
if test ${HTTP_CODE} -ne 200; then
exit ${HTTP_CODE}
fi
echo "Upload successful!"
#run: |
# echo "Begin upload..."
# AUTHORIZATION="$(echo -n '${{ secrets.USERNAME }}:${{ secrets.PASSWORD }}' | base64)"
# echo "::add-mask::${AUTHORIZATION}"
#
# HTTP_CODE=$(curl -XPOST -H "Authorization: Basic ${AUTHORIZATION}" -H "Content-Type: application/zip" --output /dev/null --silent --write-out "%{http_code}" --data-binary "@${{ env.ZIP_FILENAME }}" "https://builds.limetech.io/upload.php?project=${{ env.PROJECT }}&filename=${{ env.ZIP_FILENAME }}")
# if test ${HTTP_CODE} -ne 200; then
# exit ${HTTP_CODE}
# fi
# echo "Upload successful!"
#- name: Upload a Build Artifact
# uses: actions/upload-artifact@v4
# with:
# Artifact name
# name: ${{ matrix.os }}_${{ matrix.cc }}_${{ env.ZIP_FILENAME }}
# optional, default is artifact
# A file, directory or wildcard pattern that describes what to upload
# path: ${{ github.workspace }}/extension/build/package/${{ matrix.os }}_${{ matrix.cc }}_${{ env.ZIP_FILENAME }}
# The desired behavior if no files are found using the provided path.
# if-no-files-found: error
# Duration after which artifact will expire in days. 0 means using default retention.
# retention-days: 14