Browse Source

Always run the tests on linux-arm64

Signed-off-by: Sean Young <sean@mess.org>
Sean Young 3 years ago
parent
commit
c6edc8b6b3
1 changed files with 7 additions and 20 deletions
  1. 7 20
      .github/workflows/test.yml

+ 7 - 20
.github/workflows/test.yml

@@ -73,8 +73,7 @@ jobs:
   linux-arm:
     name: Linux Arm
     runs-on: linux-arm64
-    # Don't run linux-arm64 on pull requests, it takes 38 minutes and only has one runner
-    if: ${{ github.repository_owner == 'hyperledger-labs' && github.ref == 'refs/heads/main' }}
+    if: ${{ github.repository_owner == 'hyperledger-labs' }}
     container: ghcr.io/hyperledger-labs/solang:ci
     steps:
     - name: Checkout sources
@@ -201,36 +200,24 @@ jobs:
   image-multiarch:
     name: Multiarch Container Image
     runs-on: linux-arm64
-    # Don't run this on pull requests, it takes 28 minutes and only has one runner
-    if: ${{ github.repository_owner == 'hyperledger-labs' && github.ref == 'refs/heads/main' }}
+    if: ${{ github.repository_owner == 'hyperledger-labs' }}
     steps:
     - name: Checkout sources
       uses: actions/checkout@v3
       with:
         # Make sure "git describe --tags" works for solang --version
         fetch-depth: 0
+    - run: echo "::set-output name=push::--push"
+      id: push
+      if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
     - run: |
         echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
-        docker buildx build . --push \
+        docker buildx build . \
+          ${{steps.push.outputs.push}} \
           -t ghcr.io/${GITHUB_REPOSITORY}:latest \
           --platform linux/arm64,linux/amd64 \
           --label org.opencontainers.image.description="Solidity Compiler for Solana, Substrate, and ewasm version $(git describe --tags)"
 
-  image:
-    name: Container Image
-    runs-on: ubuntu-20.04
-    if: ${{ github.repository_owner != 'hyperledger-labs' || github.ref != 'refs/heads/main' }}
-    steps:
-    - name: Checkout sources
-      uses: actions/checkout@v2
-      with:
-        # Make sure "git describe --tags" works for solang --version
-        fetch-depth: 0
-    - run:
-        docker build .
-          -t ghcr.io/${GITHUB_REPOSITORY}:latest
-          --label org.opencontainers.image.description="Solidity Compiler for Solana, Substrate, and ewasm version $(git describe --tags)"
-
   solana:
     name: Solana Integration test
     runs-on: ubuntu-20.04