Runner Releases #23
Workflow file for this run
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
name: Runner Releases | |
on: | |
workflow_dispatch: | |
# schedule: | |
# - cron: '0 9 * * *' | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
nightly_release_x86_mac: | |
name: Native Build x86_64-apple-darwin | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- run: rustup default stable | |
- uses: Swatinem/rust-cache@v2 | |
- run: pip3 install toml maturin==0.14.13 | |
- run: python3 ci/build.py --target x86_64-apple-darwin --release --nightly --runner_release_dir /tmp/runner_releases --c_cpp_bindings_release_dir /tmp/bindings_releases | |
- name: Upload runners | |
uses: actions/upload-artifact@v3 | |
with: | |
name: runners-x86_64-apple-darwin | |
path: /tmp/runner_releases | |
- name: Upload python wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: py-wheels-macos-x86 | |
path: target/wheels/ | |
- name: Upload C/C++ bindings | |
uses: actions/upload-artifact@v3 | |
with: | |
name: c-cpp-bindings-x86_64-apple-darwin | |
path: /tmp/bindings_releases | |
nightly_release_mac_aarch64: | |
name: "Native Build macOS aarch64" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- run: pip3 install gql[requests] | |
- name: Wait for Cirrus CI builds to finish | |
run: python3 ci/trigger_cirrus_build.py | |
env: | |
CIRRUS_AUTH: ${{ secrets.CIRRUS_AUTH }} | |
- name: Upload runners | |
uses: actions/upload-artifact@v3 | |
with: | |
name: runners-macos-aarch64 | |
path: /tmp/runner_releases | |
- name: Upload python wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: py-wheels-macos-aarch64 | |
path: /tmp/target/wheels/ | |
- name: Upload C/C++ bindings | |
uses: actions/upload-artifact@v3 | |
with: | |
name: c-cpp-bindings-macos-aarch64 | |
path: /tmp/bindings_releases | |
nightly_release_buildkite: | |
name: "Native Builds Linux (x86_64 and aarch64)" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- run: pip3 install requests | |
- name: Wait for Buildkite builds to finish | |
run: python3 ci/trigger_buildkite_build.py | |
env: | |
BUILDKITE_TOKEN: ${{ secrets.BUILDKITE_TOKEN }} | |
- name: Upload runners | |
uses: actions/upload-artifact@v3 | |
with: | |
name: runners-linux | |
path: /tmp/target/runner_releases | |
- name: Upload python wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: py-wheels-linux | |
path: /tmp/target/wheels/ | |
- name: Upload C/C++ bindings | |
uses: actions/upload-artifact@v3 | |
with: | |
name: c-cpp-bindings-linux | |
path: /tmp/target/bindings_releases | |
upload_nightly_builds: | |
name: "Upload nightly builds" | |
needs: [nightly_release_mac_aarch64, nightly_release_x86_mac, nightly_release_buildkite] | |
runs-on: ubuntu-latest | |
environment: nightly | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- run: mkdir /tmp/artifacts | |
- uses: actions/download-artifact@v3 | |
with: | |
path: /tmp/artifacts | |
- name: Upload artifacts and generate config | |
run: cargo run --package carton-runner-packager --bin ci_upload_releases | |
env: | |
NIGHTLY_REPO_TOKEN: ${{ secrets.NIGHTLY_REPO_TOKEN }} | |
CARTON_NIGHTLY_S3_BUCKET: ${{ vars.CARTON_NIGHTLY_S3_BUCKET }} | |
CARTON_NIGHTLY_S3_REGION: ${{ vars.CARTON_NIGHTLY_S3_REGION }} | |
CARTON_NIGHTLY_S3_ENDPOINT: ${{ secrets.CARTON_NIGHTLY_S3_ENDPOINT }} | |
CARTON_NIGHTLY_ACCESS_KEY_ID: ${{ secrets.CARTON_NIGHTLY_ACCESS_KEY_ID }} | |
CARTON_NIGHTLY_SECRET_ACCESS_KEY: ${{ secrets.CARTON_NIGHTLY_SECRET_ACCESS_KEY }} | |
- name: Upload wheels to PyPi | |
run: > | |
pip3 install twine && | |
twine upload /tmp/artifacts/py-wheels-linux/* /tmp/artifacts/py-wheels-macos-aarch64/* /tmp/artifacts/py-wheels-macos-x86/* | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_NIGHTLY_TOKEN }} | |
TWINE_NON_INTERACTIVE: true | |
- name: Upload C and C++ bindings | |
run: cargo run --package build-utils --bin upload_c_cpp_bindings | |
env: | |
CARTON_NIGHTLY_S3_BUCKET: ${{ vars.CARTON_NIGHTLY_S3_BUCKET }} | |
CARTON_NIGHTLY_S3_REGION: ${{ vars.CARTON_NIGHTLY_S3_REGION }} | |
CARTON_NIGHTLY_S3_ENDPOINT: ${{ secrets.CARTON_NIGHTLY_S3_ENDPOINT }} | |
CARTON_NIGHTLY_ACCESS_KEY_ID: ${{ secrets.CARTON_NIGHTLY_ACCESS_KEY_ID }} | |
CARTON_NIGHTLY_SECRET_ACCESS_KEY: ${{ secrets.CARTON_NIGHTLY_SECRET_ACCESS_KEY }} | |
build_wasm: | |
name: WASM Build wasm32-unknown-unknown | |
runs-on: ubuntu-latest | |
environment: nightly | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- run: rustup target add wasm32-unknown-unknown | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: 'https://registry.npmjs.org' | |
- run: npm install -g wasm-pack [email protected] | |
- name: Update version | |
run: > | |
cd source/carton-bindings-wasm && | |
cat package.json | jq '.version += (now | strftime("-dev%Y%m%d"))' | tee package.json | |
- run: > | |
cd source/carton-bindings-wasm && ./build.sh && | |
cd tests && yarn install && node basic.js | |
- name: Publish to NPM | |
run: > | |
cd source/carton-bindings-wasm/dist && npm publish --tag next | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |