build(deps): bump libc from 0.2.166 to 0.2.167 #698
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright 2023 [email protected] | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| name: ci-build | |
| on: | |
| push: | |
| branches: ["master"] | |
| pull_request: | |
| branches: ["master"] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| release-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup ndk | |
| run: | | |
| ndk_url=$(wget -qO- https://github.com/android/ndk/releases/latest | grep -e 'https://dl.google.com/android/repository/android-ndk-.*-linux.zip' | sed -n 's/.*<a href="\([^"]*\)".*/\1/p') | |
| wget -O ndk.zip $ndk_url -nv | |
| mkdir ~/ndk_temp | |
| unzip ndk.zip -d ~/ndk_temp 2>&1 > /dev/null | |
| mv ~/ndk_temp/*/* ~/ndk_temp | |
| - name: Setup rust toolchains | |
| run: | | |
| rustup default nightly | |
| rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android | |
| rustup component add rust-src | |
| rustup update | |
| - name: Install cargo ndk | |
| run: cargo install cargo-ndk | |
| - name: Other deps | |
| run: | | |
| sudo apt update | |
| sudo apt install gcc-multilib | |
| - name: Build | |
| run: | | |
| export ANDROID_NDK_HOME=$(realpath ~/ndk_temp) | |
| export ANDROID_NDK_ROOT=$ANDROID_NDK_HOME | |
| python3 ./make.py build --release --nightly | |
| - name: Prepare artifacts | |
| run: | | |
| mkdir -p output/artifact/release | |
| unzip "output/fas-rs_release_*.zip" -d output/artifact/release | |
| - name: Upload release version | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: fas-rs(release) | |
| compression-level: 9 | |
| path: output/artifact/release | |
| debug-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup ndk | |
| run: | | |
| ndk_url=$(wget -qO- https://github.com/android/ndk/releases/latest | grep -e 'https://dl.google.com/android/repository/android-ndk-.*-linux.zip' | sed -n 's/.*<a href="\([^"]*\)".*/\1/p') | |
| wget -O ndk.zip $ndk_url -nv | |
| mkdir ~/ndk_temp | |
| unzip ndk.zip -d ~/ndk_temp 2>&1 > /dev/null | |
| mv ~/ndk_temp/*/* ~/ndk_temp | |
| - name: Setup rust toolchains | |
| run: | | |
| rustup default nightly | |
| rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android | |
| rustup component add rust-src | |
| rustup update | |
| - name: Install cargo ndk | |
| run: cargo install cargo-ndk | |
| - name: Other deps | |
| run: | | |
| sudo apt update | |
| sudo apt install gcc-multilib | |
| - name: Build | |
| run: | | |
| export ANDROID_NDK_HOME=$(realpath ~/ndk_temp) | |
| export ANDROID_NDK_ROOT=$ANDROID_NDK_HOME | |
| python3 ./make.py build --debug --nightly | |
| - name: Prepare artifacts | |
| run: | | |
| mkdir -p output/artifact/debug | |
| unzip "output/fas-rs_debug_*.zip" -d output/artifact/debug | |
| - name: Upload debug version | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: fas-rs(debug) | |
| compression-level: 9 | |
| path: output/artifact/debug | |
| push_to_ci_group: | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| name: Push to CI Group | |
| needs: | |
| - debug-build | |
| - release-build | |
| steps: | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Package Artifacts | |
| run: | | |
| cd "${{ github.workspace }}/artifacts/fas-rs(debug)" | |
| zip -9 -rq "../fas-rs(debug)" . | |
| cd "${{ github.workspace }}/artifacts/fas-rs(release)" | |
| zip -9 -rq "../fas-rs(release)" . | |
| - name: Post to Debug Group | |
| shell: bash | |
| env: | |
| GROUP_DEBUG_ID: ${{ secrets.TELEGRAM_TO }} | |
| BOT_TOKEN: ${{ secrets.TELEGRAM_TOKEN }} | |
| THREAD_ID: ${{ secrets.THREAD_ID }} | |
| COMMIT_MESSAGE: |+ | |
| New push to GitHub | |
| ``` | |
| ${{ github.event.head_commit.message }} | |
| ```by `${{ github.event.head_commit.author.name }}` | |
| See commit detail [here](${{ github.event.head_commit.url }}) | |
| run: | | |
| ESCAPED=$(python3 -c 'import json,os,urllib.parse; print(urllib.parse.quote(json.dumps(os.environ["COMMIT_MESSAGE"])))') | |
| cd ${{ github.workspace }} | |
| echo $COMMIT_MESSAGE_FIXED | |
| curl -v "https://api.telegram.org/bot${BOT_TOKEN}/sendMediaGroup?chat_id=${GROUP_DEBUG_ID}&message_thread_id=${THREAD_ID}&media=%5B%7B%22type%22:%22document%22,%20%22media%22:%22attach://debug_zip%22,%22parse_mode%22:%22MarkdownV2%22,%22caption%22:\"\"%7D,%7B%22type%22:%22document%22,%20%22media%22:%22attach://release_zip%22,%22parse_mode%22:%22MarkdownV2%22,%22caption%22:${ESCAPED}%7D%5D" -F debug_zip="@artifacts/fas-rs(debug).zip" -F release_zip="@artifacts/fas-rs(release).zip" |