Skip to content

Build unique python files #318

Build unique python files

Build unique python files #318

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"
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v2
with:
prefix-key: unique-python-files-
- 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'