Skip to content

Commit

Permalink
ci: remove aarch64 docker run via qemu in github actions - unsupported
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed Feb 22, 2024
1 parent e145b66 commit 298b60a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
5 changes: 0 additions & 5 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,10 @@ linux_arm64_alpine_task:
arm_container:
image: mcr.microsoft.com/dotnet/sdk:8.0-alpine
setup_alpine_script: apk add --no-cache curl bash gzip
# patch_cs_proj_script: |
# # cat src/PactNet/PactNet.csproj | grep musl
# sed -Ei "s|aarch64\\\libpact_ffi.so|aarch64-musl\\\libpact_ffi.so|" src/PactNet/PactNet.csproj
# cat src/PactNet/PactNet.csproj | grep musl
<< : *BUILD_TEST_TASK_TEMPLATE

linux_amd64_alpine_task:
container:
image: mcr.microsoft.com/dotnet/sdk:8.0-alpine
setup_alpine_script: apk add --no-cache curl bash gzip
# patch_cs_proj_script: sed -Ei "s|x86_64\\\libpact_ffi.so|x86_64-musl\\\libpact_ffi.so|" src/PactNet/PactNet.csproj
<< : *BUILD_TEST_TASK_TEMPLATE
25 changes: 12 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ jobs:
- os: ubuntu-latest
alpine: true
arch: x86_64
- os: ubuntu-latest
alpine: true
arch: aarch64
# - os: ubuntu-latest
# alpine: true
# arch: aarch64
## Skipped as .NET does not work with QEMU https://github.com/dotnet/core/blob/main/release-notes/8.0/supported-os.md#qemu

runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -71,19 +72,17 @@ jobs:
if: matrix.alpine != true
run: dotnet test --no-build --verbosity normal -- RunConfiguration.TargetPlatform=${{matrix.arch}}

# - name: Patch PactNet.csproj
# if: matrix.alpine == true
# run: sed -Ei "s|${{ matrix.arch }}\\\libpact_ffi.so|${{ matrix.arch }}-musl\\\libpact_ffi.so|" src/PactNet/PactNet.csproj

- name: test linux amd64 musl
if: matrix.alpine == true && matrix.arch == 'x86_64'
run: |
docker run --platform=linux/amd64 --rm -v $PWD:/app mcr.microsoft.com/dotnet/sdk:8.0-alpine /bin/sh -c 'apk add --no-cache curl bash gzip && cd /app && build/download-native-libs.sh && dotnet restore && dotnet build --no-restore && dotnet test --no-build --verbosity normal'
- name: test linux arm64 musl
if: matrix.alpine == true && matrix.arch == 'aarch64'
run: |
docker run --platform=linux/arm64 --rm -v $PWD:/app mcr.microsoft.com/dotnet/sdk:8.0-alpine /bin/sh -c 'apk add --no-cache curl bash gzip && cd /app && build/download-native-libs.sh && dotnet restore && dotnet build --no-restore && dotnet test --no-build --verbosity normal'
docker run --platform=linux/amd64 --rm -v $PWD:/app mcr.microsoft.com/dotnet/sdk:8.0-alpine /bin/sh -c 'apk add --no-cache curl bash gzip && cd /app && build/download-native-libs.sh && dotnet restore -a x86_64 && dotnet build --no-restore && dotnet test --no-build --verbosity normal'
## Skipped as .NET does not work with QEMU https://github.com/dotnet/core/blob/main/release-notes/8.0/supported-os.md#qemu
# - name: test linux arm64 musl
# if: matrix.alpine == true && matrix.arch == 'aarch64'
# run: |
# docker run --platform=linux/arm64 --rm -v $PWD:/app mcr.microsoft.com/dotnet/sdk:8.0-alpine /bin/sh -c 'apk add --no-cache curl bash gzip && cd /app && build/download-native-libs.sh && dotnet restore -a x86_64 && dotnet build --no-restore && dotnet test --no-build --verbosity normal'

- name: Pack
if: matrix.os == 'windows-latest'
run: dotnet pack --verbosity normal -c Release --no-restore --include-source --version-suffix alpha.${{ github.run_number }} -o ./dist
Expand Down

0 comments on commit 298b60a

Please sign in to comment.