diff --git a/.github/workflows/sample_build.yml b/.github/workflows/sample_build.yml deleted file mode 100644 index f12b30e5..00000000 --- a/.github/workflows/sample_build.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Sample build - -on: - workflow_dispatch: {} - -jobs: - build_wheels: - name: Sample build [${{ matrix.os }},${{ matrix.result }}] - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-18.04, windows-latest, macos-latest] - result: [success, failure] - - steps: - - uses: actions/checkout@v2 - - - uses: actions/setup-python@v2 - name: Install Python - with: - python-version: '3.7' - - - name: Install dependencies - run: | - python -m pip install -r requirements-dev.txt - - - name: Install Visual C++ for Python 2.7 - if: runner.os == 'Windows' - run: | - choco install vcpython27 -f -y - - - name: Generate sample project - shell: bash - run: | - if $should_fail; then - python -m test.test_projects test.test_testing.project_with_a_failing_test sample_project - else - python -m test.test_projects test.test_testing.project_with_a_test sample_project - fi - env: - should_fail: ${{ matrix.result == 'failure' }} - - - name: Build & test wheels - shell: bash - run: | - cd sample_project - if $should_fail; then - # prefix with ! to expect failure - ! python -m cibuildwheel --output-dir wheelhouse - else - python -m cibuildwheel --output-dir wheelhouse - fi - env: - CIBW_TEST_COMMAND: nosetests {project}/test - CIBW_TEST_REQUIRES: nose - should_fail: ${{ matrix.result == 'failure' }} diff --git a/bin/sample_build.py b/bin/sample_build.py index c8a13e67..204bbf0c 100755 --- a/bin/sample_build.py +++ b/bin/sample_build.py @@ -20,4 +20,4 @@ if __name__ == '__main__': project_dir = tempfile.mkdtemp() subprocess.run([sys.executable, '-m', 'test.test_projects', options.PROJECT_PYTHON_PATH, project_dir], check=True) - subprocess.run(['cibuildwheel'], check=True, cwd=project_dir) + exit(subprocess.run(['cibuildwheel'], cwd=project_dir).returncode)