name: Python libs on: push: branches: [ master ] pull_request: branches: [ master ] # schedule: # # Every day at 1am # - cron: '0 1 * * *' jobs: get_Latest: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, '[ci skip]')" steps: - name: Checkout ILL repo run: | git clone https://code.ill.fr/scientific-software/crysfml/ ./ git checkout feature-python_api-build_wheels rm -rf ./.git ./Html - uses: actions/upload-artifact@v2 with: name: CrysFML_SRC path: ${{ github.workspace }} retention-days: 1 create-Linux: runs-on: ubuntu-latest needs: get_Latest steps: - uses: actions/download-artifact@v2 with: name: CrysFML_SRC - name: Build manylinux wheels run: | chmod +x ./Scripts/buildscript.sh docker run -e PLAT=manylinux2010_x86_64 -v ${{ github.workspace }}:/io quay.io/pypa/manylinux2010_x86_64 /io/Scripts/buildscript.sh - uses: actions/upload-artifact@v2 with: name: CrysFML - Linux path: ${{ github.workspace }}/dist/*.whl create-OSX: strategy: max-parallel: 4 matrix: python-version: ['3.8'] os: [macos-10.15] gcc_v: [ 10 ] # Version of GFortran we want to use. runs-on: ${{ matrix.os }} needs: get_Latest steps: - uses: actions/download-artifact@v2 with: name: CrysFML_SRC - name: Setup python uses: actions/setup-python@v1 with: python-version: ${{matrix.python-version}} - name: Install cmake run: pip3 install cmake delocate wheel - name: Build CFML (OSX) env: FC: gfortran-${{ matrix.gcc_v }} CC: gcc-${{ matrix.gcc_v }} run: | pip3 wheel ./ --no-deps -w ./old/ delocate-wheel -w dist -v ./old/*.whl - uses: actions/upload-artifact@v2 with: name: CrysFML - MacOS path: ./dist/*.whl create-Windows: strategy: max-parallel: 1 matrix: python-version: [ '3.6', '3.7'] os: [ windows-latest ] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - uses: conda-incubator/setup-miniconda@v2 with: auto-update-conda: true python-version: ${{ matrix.python-version }} auto-activate-base: true - uses: msys2/setup-msys2@v2 with: msystem: MSYS install: cmake mingw-w64-x86_64-toolchain update: true path-type: inherit - name: Build CFML shell: msys2 {0} id: build run: python setup.py bdist_wheel env: MINGW_ARCH: MINGW64 - uses: actions/upload-artifact@v2 with: name: CrysFML - Windows path: ./dist/*.whl Upload_Artifacts: runs-on: ubuntu-latest needs: [create-Linux, create-OSX] steps: - uses: actions/download-artifact@v2 - name: What is downloaded run: | ls -al - name: Upload Artifacts GitHub releases uses: ncipollo/release-action@v1 with: draft: false prerelease: true allowUpdates: true replacesArtifacts: true token: ${{ secrets.GITHUB_TOKEN }} artifacts: "./**/*.whl" tag: "CurrentBuild" body: "This is a build of the CFML libraries."