Daily Workflow #371
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: Daily Workflow | |
on: | |
# Run every week day at 12 PM UTC | |
schedule: | |
- cron: "0 12 * * 1-5" | |
# Allow workflow to be triggered manually. | |
workflow_dispatch: | |
env: | |
BRANCH: "main" | |
CARGO_TERM_COLOR: always | |
jobs: | |
# Generate lockfile separately so that each OS uses the same locked | |
# versions. Using ubuntu-latest because it is the cheapest. | |
generate-lockfile-and-audit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ env.BRANCH }} | |
- name: Generate lockfile | |
run: cargo generate-lockfile -v | |
- name: Install cargo make | |
uses: davidB/rust-cargo-make@v1 | |
with: | |
version: "0.36.13" | |
#- name: Audit | |
# run: cargo make --profile github-actions audit | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Cargo.lock | |
path: Cargo.lock | |
intense-tests: | |
needs: generate-lockfile-and-audit | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install cargo make | |
uses: davidB/rust-cargo-make@v1 | |
with: | |
version: "0.36.13" | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ env.BRANCH }} | |
- name: Test with release | |
run: cargo make --profile github-actions test | |
publish: | |
needs: intense-tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ env.BRANCH }} | |
- name: Publish | |
uses: katyo/publish-crates@v2 | |
with: | |
args: "--verbose" | |
publish-delay: 1000 # Wait 1 second between publishing dependencies. | |
ignore-unpublished-changes: true | |
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
devenv: | |
timeout-minutes: 120 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build devenv containers | |
run: ./devenv/build.sh |