chore(deps): update rust crate anyhow to 1.0.94 #800
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: ci | |
on: | |
push: | |
branches: ["main", "release"] | |
paths: | |
- ".github/workflows/ci.yml" | |
- "app/**" | |
- "crates/**" | |
- "Cargo.toml" | |
- "Cargo.lock" | |
- "pnpm-lock.yaml" | |
- "package.json" | |
pull_request: | |
branches: ["main"] | |
types: | |
- opened | |
- synchronize | |
paths: | |
- ".github/workflows/ci.yml" | |
- "app/**" | |
- "crates/**" | |
- "Cargo.toml" | |
- "Cargo.lock" | |
- "pnpm-lock.yaml" | |
- "package.json" | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
deployments: write | |
pull-requests: write | |
env: | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
steps: | |
- name: Comment deploy start | |
if: ${{ !startsWith(env.BRANCH_NAME, 'renovate/') && github.event_name == 'pull_request' }} | |
uses: mshick/add-pr-comment@v2 | |
with: | |
message-id: cloudflare-deploy | |
message: | | |
### <span aria-hidden="true">🚧</span> Deploy Preview building... | |
| Name | Link | | |
|---------------------------------|------------------------| | |
|Latest commit | ${{ github.event.pull_request.head.sha }} | | |
|Latest deploy log | ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | | |
--- | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Normalize branch name | |
run: echo "NORMALIZED_BRANCH_NAME=$(echo $BRANCH_NAME | tr -cs '[:alnum:]' '-' | sed 's/^-//;s/-$//' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV | |
- name: Setup rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: "1.81.0" | |
targets: "wasm32-unknown-unknown,x86_64-unknown-linux-gnu" | |
components: "clippy" | |
- uses: Swatinem/rust-cache@v2 | |
- uses: actions/setup-node@v4 | |
name: Setup Node.js | |
with: | |
node-version: "20" | |
- uses: pnpm/action-setup@v3 | |
name: Install pnpm | |
with: | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "PNPM_STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v4 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.PNPM_STORE_PATH }} | |
key: pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
pnpm-store- | |
- name: Install wasm-pack | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Run tests | |
run: cargo test --workspace --exclude gb_wasm --target x86_64-unknown-linux-gnu | |
- name: Lint | |
run: cargo clippy --target wasm32-unknown-unknown | |
- name: Build WASM | |
working-directory: ./crates/gb_wasm | |
run: "./x.mjs build" | |
- name: Install dependencies for web app | |
run: pnpm install --frozen-lockfile | |
- name: Build web app | |
working-directory: ./app/gameboy | |
run: pnpm run build | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/pages-action@v1 | |
if: ${{ !startsWith(env.BRANCH_NAME, 'renovate/') }} | |
id: cloudflare-publish | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
projectName: gbplay | |
directory: dist | |
branch: ${{ env.NORMALIZED_BRANCH_NAME }} | |
workingDirectory: app/gameboy | |
wranglerVersion: "3" | |
- name: Comment deploy URL | |
uses: mshick/add-pr-comment@v2 | |
if: ${{ !startsWith(env.BRANCH_NAME, 'renovate/') && github.event_name == 'pull_request' }} | |
with: | |
message-id: cloudflare-deploy | |
message: | | |
### <span aria-hidden="true">✅</span> Deploy Preview ready! | |
| Name | Link | | |
|---------------------------------|------------------------| | |
|Latest commit | ${{ github.event.pull_request.head.sha }} | | |
|Latest deploy log | ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | | |
|Preview URL | [${{ steps.cloudflare-publish.outputs.url }}](${{ steps.cloudflare-publish.outputs.url }}) | | |
|Branch Preview URL | [${{ env.NORMALIZED_BRANCH_NAME }}.gbplay.pages.dev](https://${{ env.NORMALIZED_BRANCH_NAME }}.gbplay.pages.dev) | | |
|Environment | ${{ steps.cloudflare-publish.outputs.environment }} | | |
--- |