diff --git a/.github/workflows/anaconda.yml b/.github/workflows/anaconda.yml new file mode 100644 index 00000000..6ba732dc --- /dev/null +++ b/.github/workflows/anaconda.yml @@ -0,0 +1,92 @@ +on: + - push + - pull_request +jobs: + linux: + strategy: + fail-fast: false + matrix: + py: + - '3.5' + - '3.6' + - '3.7' + runs-on: 'ubuntu-20.04' + env: + # Enable fuzzing tests, other expensive tests. + ZSTD_SLOW_TESTS: '1' + # Make all compile warnings fatal. + ZSTD_WARNINGS_AS_ERRORS: '1' + # More thorough fuzzing coverage. + HYPOTHESIS_PROFILE: 'ci' + steps: + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.py }} + + - uses: actions/checkout@v2 + + - name: Create Anaconda Environment + run: | + $CONDA/bin/conda create --yes --quiet --name env python=${{ matrix.py }} + + - name: Install Dependencies + run: | + source $CONDA/bin/activate env + $CONDA/bin/conda install --yes --quiet --name env conda-build pip + pip install --require-hashes -r ci/requirements.txt + + - name: Build and Test + run: | + source $CONDA/bin/activate env + $CONDA/bin/conda build ci/conda + python ci/copy-conda-package.py + + - name: Upload Package + uses: actions/upload-artifact@v2 + with: + path: dist + + windows: + strategy: + fail-fast: false + matrix: + py: + - '3.5' + - '3.6' + - '3.7' + - '3.8' + runs-on: 'windows-2019' + env: + # Enable fuzzing tests, other expensive tests. + ZSTD_SLOW_TESTS: '1' + # Make all compile warnings fatal. + ZSTD_WARNINGS_AS_ERRORS: '1' + # More thorough fuzzing coverage. + HYPOTHESIS_PROFILE: 'ci' + steps: + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.py }} + + - uses: actions/checkout@v2 + + - name: Create Anaconda Environment + run: | + C:\Miniconda\condabin\conda.bat create --yes --quiet --name env python=${{ matrix.py }} + + - name: Install Dependencies + run: | + C:\Miniconda\condabin\conda.bat install --yes --quiet --name env conda-build pip + C:\Miniconda\envs\env\python.exe -m pip install --user --require-hashes -r ci/requirements.txt + + - name: Build and Test + run: | + C:\Miniconda\envs\env\Scripts\conda-build.exe ci/conda + C:\Miniconda\envs\env\python.exe ci/copy-conda-package.py + + - name: Upload Package + uses: actions/upload-artifact@v2 + with: + path: dist diff --git a/ci/azure-pipelines-anaconda-linux-template.yml b/ci/azure-pipelines-anaconda-linux-template.yml deleted file mode 100644 index 1e1e5d0b..00000000 --- a/ci/azure-pipelines-anaconda-linux-template.yml +++ /dev/null @@ -1,45 +0,0 @@ -jobs: -- job: ${{ parameters.name }} - pool: - vmImage: ${{ parameters.vmImage }} - strategy: - matrix: - Python3.5: - python_version: '3.5' - Python3.6: - python_version: '3.6' - Python3.7: - python_version: '3.7' - - variables: - # Enable fuzzing tests, other expensive tests. - ZSTD_SLOW_TESTS: '1' - - # Make all compile warnings fatal. - ZSTD_WARNINGS_AS_ERRORS: '1' - - # More thorough fuzzing coverage. - HYPOTHESIS_PROFILE: ci - - steps: - - bash: echo "##vso[task.prependpath]$CONDA/bin" - displayName: Add conda to PATH - - - bash: conda create --yes --quiet --name env python=$PYTHON_VERSION - displayName: Create Anaconda environment - - - bash: | - source activate env - conda install --yes --quiet --name env conda-build pip - pip install --require-hashes -r ci/requirements.txt - displayName: Install dependencies - - - bash: | - source activate env - conda build ci/conda - python ci/copy-conda-package.py - displayName: Build and Test - - - task: PublishPipelineArtifact@1 - inputs: - path: $(System.DefaultWorkingDirectory)/dist diff --git a/ci/azure-pipelines-anaconda-windows-template.yml b/ci/azure-pipelines-anaconda-windows-template.yml deleted file mode 100644 index c7eab5c5..00000000 --- a/ci/azure-pipelines-anaconda-windows-template.yml +++ /dev/null @@ -1,47 +0,0 @@ -jobs: -- job: ${{ parameters.name }} - pool: - vmImage: ${{ parameters.vmImage }} - strategy: - matrix: - Python3.5: - python_version: '3.5' - Python3.6: - python_version: '3.6' - Python3.7: - python_version: '3.7' - Python3.8: - python_version: '3.8' - - variables: - # Enable fuzzing tests, other expensive tests. - ZSTD_SLOW_TESTS: '1' - - # Make all compile warnings fatal. - ZSTD_WARNINGS_AS_ERRORS: '1' - - # More thorough fuzzing coverage. - HYPOTHESIS_PROFILE: ci - - steps: - - powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" - displayName: Add conda to PATH - - - script: conda create --yes --quiet --name env python=%PYTHON_VERSION% - displayName: Create Anaconda environment - - - script: | - call activate env || exit 1 - call conda install --yes --quiet --name env conda-build pip || exit 1 - call pip install --require-hashes -r ci/requirements.txt || exit 1 - displayName: Install dependencies - - - script: | - call activate env || exit 1 - call conda build ci/conda || exit 1 - call python ci/copy-conda-package.py || exit 1 - displayName: Build and Test - - - task: PublishPipelineArtifact@1 - inputs: - path: $(System.DefaultWorkingDirectory)/dist diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml deleted file mode 100644 index ccfa2728..00000000 --- a/ci/azure-pipelines.yml +++ /dev/null @@ -1,10 +0,0 @@ -jobs: -- template: azure-pipelines-anaconda-linux-template.yml - parameters: - name: Linux_Anaconda - vmImage: ubuntu-18.04 - -- template: azure-pipelines-anaconda-windows-template.yml - parameters: - name: Windows_Anaconda - vmImage: vs2017-win2016