Fix path concatenation for Python installations #317
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: .NET | |
| on: | |
| push: | |
| branches: [ "*" ] | |
| tags: | |
| - v* | |
| jobs: | |
| build-ubuntu: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-22.04, ubuntu-24.04] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Fix tags | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: git fetch -f origin ${{ github.ref }}:${{ github.ref }} | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v2 | |
| with: | |
| dotnet-version: 6.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore -c Release | |
| - name: Package Examples | |
| run: | | |
| pushd bin/Release | |
| ./tap python pack-template-project --dir ../../OpenTap.Python.ProjectTemplate/ --out Packages/Python/OpenTap.Python.ProjectTemplate.zip --verbose | |
| # Update OpenTAP so plugin types will be serialized into package xml files | |
| ./tap package install OpenTAP --version 9.23.0 | |
| ./tap package create ../../Python.Build/package.xml --install | |
| ./tap package create ../../OpenTap.Python.Examples/package.xml | |
| popd | |
| - name: Test | |
| run: ./bin/Release/tap python test | |
| - name: Test Plan | |
| run: | | |
| pip install numpy | |
| ./bin/Release/tap run bin/Release/test.TapPlan --non-interactive | |
| - name: Test Project Creation | |
| run: | | |
| # Copy packages to cache. | |
| cp bin/Release/Python*.TapPackage ~/.local/share/OpenTap/PackageCache | |
| ./bin/Release/tap python new-project --directory /tmp/MyProject/Test2 --project-name Test2 --verbose | |
| pushd /tmp/MyProject/Test2 | |
| dotnet build | |
| bin/tap package create ./package.xml | |
| popd | |
| - name: Upload binaries | |
| if: matrix.os == 'ubuntu-24.04' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: TapPackage | |
| retention-days: 14 | |
| path: | | |
| bin/Release/Python*.TapPackage | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.8' | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore | |
| - name: Test | |
| run: ./bin/Debug/tap python test | |
| - name: Test Plan | |
| run: | | |
| pip install numpy | |
| ./bin/Debug/tap run bin/Debug/test.TapPlan --non-interactive | |
| test-macos: | |
| runs-on: macos-26 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.13' | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore | |
| - name: Test | |
| run: | | |
| ./bin/Debug/tap python set-path $Python3_ROOT_DIR | |
| ./bin/Debug/tap python set-lib-path $Python3_ROOT_DIR/lib/libpython3.13.dylib | |
| ./bin/Debug/tap python test | |
| - name: Test Plan | |
| run: | | |
| pip install numpy | |
| ./bin/Debug/tap run bin/Debug/test.TapPlan --non-interactive | |
| publish-package: | |
| if: github.ref == 'refs/heads/dev' || contains(github.ref, 'refs/heads/release') || contains(github.ref, 'refs/tags/v') | |
| environment: packages.opentap.io | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build-ubuntu | |
| steps: | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: TapPackage | |
| path: ./ | |
| - name: Setup OpenTAP | |
| uses: opentap/setup-opentap@v1.0 | |
| with: | |
| version: 9.18.4 | |
| - name: Test Install | |
| run: tap package install ./Python.*.TapPackage | |
| - name: Install PackagePublish | |
| run: tap package install -f PackagePublish --version 3.0.0+efea95ee | |
| - name: Publish | |
| run: | | |
| tap package publish -r http://packages.opentap.io -k ${{ secrets.REPO_PASS }} Python.*.TapPackage | |
| tap package publish -r http://packages.opentap.io -k ${{ secrets.REPO_PASS2 }} PythonExamples.*.TapPackage | |
| build-pages: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Pages Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Install | |
| run: npm install | |
| working-directory: Documentation/TAP_Python_Help | |
| - name: Build | |
| run: npm run build | |
| env: | |
| # Newer versions of ssl no longer supports the hashing used by vuepress(webpack). | |
| NODE_OPTIONS: --openssl-legacy-provider | |
| working-directory: Documentation/TAP_Python_Help | |
| - name: Upload Docs | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Pages | |
| retention-days: 14 | |
| path: | | |
| public | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v4 | |
| if: github.ref == 'refs/heads/dev' || contains(github.ref, 'refs/heads/release') || contains(github.ref, 'refs/tags/v') | |
| with: | |
| publish_dir: public | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: pages | |