Skip to content

Commit

Permalink
[ci]: Testing concurency
Browse files Browse the repository at this point in the history
  • Loading branch information
milosbackonja committed Feb 4, 2025
1 parent 34aefc6 commit c03050f
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ name: Rust CI

on:
push:
branches: [ main ]
branches: [ main, ci-github-migration]
pull_request:
branches: [ main ]

concurrency:
group: ${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
lint:
name: ${{ matrix.expand.name }}
Expand All @@ -32,8 +36,8 @@ jobs:
run: ${{ matrix.expand.cmd }}
build:
name: build-${{ matrix.expand.name }}
runs-on: ${{ matrix.expand.runner }}
needs: [lint]
runs-on: ${{ matrix.expand.runner }}
env:
RUST_VERSION: 1.83.0
container: rustlang/rust:nightly
Expand Down Expand Up @@ -62,16 +66,13 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: AMD job configuration template with stable Rust
if: ${{ matrix.expand.name == 'debug-amd-stable' }}
run: |
rustup set auto-self-update disable
rustup toolchain install $RUST_VERSION
- name: Run Command
run: ${{ matrix.expand.cmd }}

- name: Upload static files as artifact
if: ${{ matrix.expand.name == 'docs' }}
id: deployment
Expand All @@ -80,8 +81,8 @@ jobs:
path: "target/doc"
test:
name: unit-test-${{ matrix.expand.name }}
runs-on: ${{ matrix.expand.runner }}
needs: [build]
runs-on: ${{ matrix.expand.runner }}
env:
RUST_VERSION: 1.83.0
container: rustlang/rust:nightly
Expand Down Expand Up @@ -113,29 +114,24 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: AMD job configuration template with stable Rust
if: ${{ matrix.expand.name == 'amd-stable' }}
run: |
rustup set auto-self-update disable
rustup toolchain install $RUST_VERSION
- name: Run Command
run: ${{ matrix.expand.cmd }}

deploy:
name: deploy-pages
needs: build
needs: [build]
runs-on: ubuntu-latest
if: github.ref_name == 'main'
permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
Expand Down

0 comments on commit c03050f

Please sign in to comment.