.github: workflows: Fix per commit buildability check

Fetch the whole git repository (not just the specific commit) and use
the github context instead of hardcoded branch.

Unfortunately now that we process the list of revisions correctly it
shows that the checks don't work on aarch64 due to cross limitations so
this has been removed.

Fixes: #4523

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2022-08-19 17:26:14 +01:00
parent 8c02648ac9
commit 850c0c8319
2 changed files with 8 additions and 9 deletions

View File

@ -21,7 +21,8 @@ jobs:
experimental: true
steps:
- name: Code checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install Rust toolchain (${{ matrix.rust }})
uses: actions-rs/toolchain@v1
with:
@ -30,11 +31,6 @@ jobs:
override: true
components: rustfmt, clippy
- name: Debug Check (default features)
run: |
git rev-list origin/main..$GITHUB_SHA | xargs -t -I % sh -c 'git checkout %; cargo check --tests --all --target=${{ matrix.target }}'
git checkout $GITHUB_SHA
- name: Formatting (rustfmt)
run: cargo fmt -- --check

View File

@ -21,7 +21,10 @@ jobs:
experimental: true
steps:
- name: Code checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Rust toolchain (${{ matrix.rust }})
uses: actions-rs/toolchain@v1
with:
@ -32,8 +35,8 @@ jobs:
- name: Debug Check (default features)
run: |
git rev-list origin/main..$GITHUB_SHA | xargs -t -I % sh -c 'git checkout %; cargo check --tests --all --target=${{ matrix.target }}'
git checkout $GITHUB_SHA
git rev-list origin/${{ github.base_ref }}..${{ github.sha }} | xargs -t -I % sh -c 'git checkout %; cargo check --tests --all --target=${{ matrix.target }}'
git checkout ${{ github.sha }}
- name: Formatting (rustfmt)
run: cargo fmt -- --check