Skip to content

Commit

Permalink
feat: get glibc version in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Chiichen committed Oct 18, 2024
1 parent 4fda5a6 commit ef53476
Showing 1 changed file with 34 additions and 22 deletions.
56 changes: 34 additions & 22 deletions .github/workflows/glibcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,23 @@ jobs:
- name: Checkout
run: |
python arch/${{matrix.arch}}/build-${{matrix.arch}}.py --shallow arch/${{matrix.arch}} checkout
- name: Store Global Version Json
run: |
cd arch/${{matrix.arch}}/src
echo "GLABAL_VERSION_JSON=$(jq -c . < versions.json)" >> $GITHUB_ENV
- name: Store Glibc Version
# 在arch/${{matrix.arch}}/src/glibc下,读取version.h中的版本值
run: |
cd arch/${{matrix.arch}}/src/glibc &&
glibc_version=$(grep 'VERSION' version.h | awk '{print $3}' | sed 's/"//g') &&
echo "GLIBC_VERSION=${glibc_version}" >> $GITHUB_ENV
- name: Debug
run: |
cd arch/${{matrix.arch}}/src &&
ls -ahl &&
cat versions.json
cat versions.json &&
echo '${{ fromJson(env.GLABAL_VERSION_JSON).glibc.version }}' &&
echo ${{env.GLIBC_VERSION}}
- name: Build Host-libraries
run: |
python arch/${{matrix.arch}}/build-${{matrix.arch}}.py -j $(nproc) arch/${{matrix.arch}} host-libraries
Expand Down Expand Up @@ -53,27 +65,27 @@ jobs:
name: glibcs-${{matrix.arch}}
path: |
arch/${{matrix.arch}}/release/glibcs
# release:
# if: startsWith(github.ref, 'refs/tags/v')
# needs: [meta, build]
# runs-on: ubuntu-latest
# steps:
# - name: Download glibc from Github
# uses: actions/download-artifact@v4
# with:
# path: assets
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Download glibc from Github
uses: actions/download-artifact@v4
with:
path: assets

# - name: Cleanup files
# run: |
# mv -vf assets/changelog/* .
# cd assets
# find . -type f | while read f; do mv -fvt . $f; done
- name: Cleanup files
run: |
mv -vf assets/changelog/* .
cd assets
find . -type f | while read f; do mv -fvt . $f; done
# - name: Release to Github
# uses: softprops/action-gh-release@v1
# with:
# body_path: CHANGELOG.md
# files: |
# assets/*
# prerelease: ${{ needs.meta.outputs.prerelease != 'false' }}
- name: Release to Github
uses: softprops/action-gh-release@v1
with:
body_path: CHANGELOG.md
files: |
assets/*
prerelease: ${{ needs.meta.outputs.prerelease != 'false' }}

0 comments on commit ef53476

Please sign in to comment.