Skip to content

Commit

Permalink
test: add ARM E2E
Browse files Browse the repository at this point in the history
Signed-off-by: Junjie Gao <[email protected]>
  • Loading branch information
JeyJeyGao committed Jan 22, 2025
1 parent 6b9a95f commit b5eb8e8
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 20 deletions.
15 changes: 1 addition & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
os: ubuntu-24.04
- runtime: linux-arm64
build_args: --enable-aot
os: ubuntu-24.04
os: ubuntu-24.04-arm
- runtime: win-x64
build_args: --enable-aot
os: windows-2022
Expand All @@ -41,19 +41,6 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Setup ARM64 Emulator
if: matrix.config.runtime == 'linux-arm64'
run: |
sudo dpkg --add-architecture arm64
sudo bash -c 'cat > /etc/apt/sources.list.d/arm64.list <<EOF
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted universe multiverse
EOF'
sudo sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
sudo sed -i -e 's/deb mirror/deb [arch=amd64] mirror/g' /etc/apt/sources.list
sudo apt update
sudo apt install -y clang llvm binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu zlib1g-dev:arm64
- name: Build .NET project
shell: bash
run: python3 ./scripts/build.py "${GITHUB_REF_NAME}" ${{ matrix.config.runtime }} ${{ matrix.config.build_args }}
Expand Down
51 changes: 45 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,37 @@ jobs:
name: darwin-amd64-binary
path: ./bin/artifacts/notation-azure-kv_0.0.1_darwin_amd64.tar.gz
retention-days: 1
test-arm:
name: Unit Testing and Build on ARM
runs-on: ubuntu-24.04-arm
timeout-minutes: 5
permissions:
contents: read
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Check out code into the project directory
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run unit tests
run: make test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Build Linux Binary
run: |
# the binary will be used in E2E test
python3 ./scripts/build.py v0.0.1 linux-arm64 --enable-aot
- name: Upload Linux artifact
uses: actions/upload-artifact@v4
with:
name: linux-arm64-binary
path: ./bin/artifacts/notation-azure-kv_0.0.1_linux_arm64.tar.gz
retention-days: 1
e2e-mariner-container:
name: E2E testing for Mariner container
runs-on: ubuntu-latest
Expand Down Expand Up @@ -128,27 +159,35 @@ jobs:
AZURE_FEDERATED_TOKEN_FILE: ./federated_token
e2e-linux:
name: E2E testing on Linux
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
config:
- os: ubuntu-24.04
arch: amd64
- os: ubuntu-22.04
arch: amd64
- os: ubuntu-24.04-arm
arch: arm64
- os: ubuntu-22.04-arm
arch: arm64
environment: E2E
needs: test
needs: [test, test-arm]
steps:
- name: Check out code into the project directory
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
name: linux-amd64-binary
name: linux-${{ matrix.config.arch }}-binary
path: ./bin/artifacts
- name: Run download server locally
run: |
nohup python3 -m http.server --directory ./bin/artifacts/ &
# prepare the environment variables for E2E
artifactName=notation-azure-kv_0.0.1_linux_amd64.tar.gz
artifactName=notation-azure-kv_0.0.1_linux_${{ matrix.config.arch }}.tar.gz
checksum=$(shasum -a 256 "./bin/artifacts/$artifactName" | awk '{print $1}')
echo "pluginChecksum=$checksum" >> "$GITHUB_ENV"
echo "pluginDownloadURL=http://localhost:8000/$artifactName" >> "$GITHUB_ENV"
Expand All @@ -174,7 +213,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2019, windows-2022, windows-2025]
os: [windows-2022, windows-2025]
environment: E2E
needs: test
steps:
Expand Down

0 comments on commit b5eb8e8

Please sign in to comment.