Build unique python files #437
This file contains 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
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 6 * * *" | |
name: Build unique python files | |
concurrency: build-unique-python | |
jobs: | |
build_and_test: | |
name: Compile toolchain | |
runs-on: ubuntu-latest | |
if: github.repository == 'pypi-data/data' | |
env: | |
RUST_BACKTRACE: "1" | |
SCCACHE_GHA_ENABLED: "true" | |
RUSTC_WRAPPER: "sccache" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
cache-on-failure: 'false' | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Build optimized release | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --profile=optimized | |
env: | |
RUSTFLAGS: '-C target-cpu=native' | |
- name: Run | |
run: | | |
./target/optimized/data links/dataset.txt data/ | |
- name: Check | |
run: | | |
ls -la data/ | |
- name: Fetch Latest Release | |
id: get_release | |
uses: gregziegan/[email protected] | |
with: | |
github_token: ${{ github.token }} | |
- name: Upload Assets | |
id: upload-assets | |
uses: shogo82148/actions-upload-release-asset@v1 | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: ${{ github.workspace }}/data/combined.parquet | |
asset_name: unique_python_files.parquet | |
- run: | | |
echo "${{ steps.upload-assets.outputs.browser_download_url }}" > links/only_python_files.txt | |
- uses: EndBug/add-and-commit@v9 | |
with: | |
add: 'links/only_python_files.txt' | |
author_email: "41898282+github-actions[bot]@users.noreply.github.com" | |
author_name: "commit-bot" | |
message: "Add stats" | |
push: true | |
fetch: true | |
pull: '--rebase --autostash' |