Skip to content

Commit

Permalink
Translate GH Runner arch to dotnet arch.
Browse files Browse the repository at this point in the history
  • Loading branch information
GinoCanessa committed Sep 12, 2024
1 parent ed3f6b3 commit 64929ee
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,28 @@ jobs:
path: ~/.fhir
key: cache-unit-test-fhir-packages-20240909
enableCrossOsArchive: true

- name: Install dependencies
run: dotnet restore -a ${{runner.arch}}

- name: Translate runner.arch to dotnet arch x86
if: $runner.arch == 'X86'
run: echo "export DOTNET_ARCH=x86" >> $GITHUB_ENV

- name: Translate runner.arch to dotnet arch x64
if: $runner.arch == 'X64'
run: echo "export DOTNET_ARCH=x64" >> $GITHUB_ENV

- name: Translate runner.arch to dotnet arch ARM
if: $runner.arch == 'ARM'
run: echo "export DOTNET_ARCH=arm" >> $GITHUB_ENV

- name: Translate runner.arch to dotnet arch ARM64
if: $runner.arch == 'ARM64'
run: echo "export DOTNET_ARCH=arm64" >> $GITHUB_ENV

- name: Install dependencies, use the dotnet arch
run: dotnet restore -a ${{env.DOTNET_ARCH}}

- name: Build
run: dotnet build --configuration Release --no-restore --framework net8.0 -a ${{runner.arch}}
run: dotnet build --configuration Release --no-restore --framework net8.0 -a ${{env.DOTNET_ARCH}}

- name: Test
run: dotnet test --configuration Release --no-restore --framework net8.0 --verbosity normal --filter "RequiresExternalRepo!=true" -a ${{runner.arch}}
run: dotnet test --configuration Release --no-restore --framework net8.0 --verbosity normal --filter "RequiresExternalRepo!=true" -a ${{env.DOTNET_ARCH}}

0 comments on commit 64929ee

Please sign in to comment.