From 7c20e91dac27f176ba83a29afbf2eadb5c60d637 Mon Sep 17 00:00:00 2001 From: Chong Shen Ng Date: Wed, 9 Oct 2024 21:10:37 +0100 Subject: [PATCH] Add build/install test --- .github/workflows/e2e.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 7ac339aa43c8..012f584561ac 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -311,3 +311,39 @@ jobs: if grep -q "ERROR" flwr_output.log; then exit 1 fi + + build_and_install: + runs-on: ubuntu-22.04 + timeout-minutes: 10 + needs: wheel + strategy: + matrix: + framework: ["numpy"] + python-version: ["3.9", "3.10", "3.11"] + + name: | + Build & Install / + Python ${{ matrix.python-version }} / + ${{ matrix.framework }} + + steps: + - uses: actions/checkout@v4 + - name: Bootstrap + uses: ./.github/actions/bootstrap + with: + python-version: ${{ matrix.python-version }} + poetry-skip: 'true' + - name: Install Flower from repo + if: ${{ github.repository != 'adap/flower' || github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' }} + run: | + python -m pip install . + - name: Install Flower wheel from artifact store + if: ${{ github.repository == 'adap/flower' && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} + run: | + python -m pip install https://${{ env.ARTIFACT_BUCKET }}/py/${{ needs.wheel.outputs.dir }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }} + - name: Create project, build, and install it + run: | + flwr new tmp-${{ matrix.framework }} --framework ${{ matrix.framework }} --username gh_ci + cd tmp-${{ matrix.framework }} + flwr build + flwr install *.fab