diff --git a/.github/workflows/conda-pack-windows-arm.yaml b/.github/workflows/conda-pack-windows-arm.yaml new file mode 100644 index 000000000..96a0d9df2 --- /dev/null +++ b/.github/workflows/conda-pack-windows-arm.yaml @@ -0,0 +1,72 @@ +name: Build windows-arm64 conda environment + +on: [push] + +jobs: + build-windows-arm: + strategy: + matrix: + python-version: ["3.10"] + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64 + + - name: Run ARM environment in Docker + run: | + docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace --platform linux/arm64 \ + condaforge/miniforge3 bash -c " + conda create -n wake --platform win-arm64 python=3.10 -y && \ + source activate wake && \ + conda install -c conda-forge conda-pack -y && \ + python -m pip install . && \ + VERSION=\$(wake --version) && \ + echo \"VERSION=\${VERSION}\" >> /workspace/filename_env && \ + FILENAME=wake-\${VERSION}-win-arm64.tar.gz && \ + echo \"FILENAME=\${FILENAME}\" >> /workspace/filename_env && \ + conda-pack -n wake -o \${FILENAME} && \ + sha256sum \${FILENAME} > \${FILENAME}.sha256 && \ + echo '${{ secrets.CONDA_PRIVATE_KEY }}' > key.pem && \ + openssl dgst -sha256 -sign key.pem -out \${FILENAME}.sha256.sig \${FILENAME}.sha256 + " + + - name: Append FILENAME to GITHUB_ENV + run: | + cat ${{ github.workspace }}/filename_env >> $GITHUB_ENV + + - name: Adjust permissions + run: icacls ${{ github.workspace }} /grant Everyone:(OI)(CI)F + + - name: Auth to Google Storage + uses: 'google-github-actions/auth@v2' + with: + credentials_json: ${{ secrets.GCP_SA_KEY }} + + - name: Upload tarball + uses: 'google-github-actions/upload-cloud-storage@v2' + with: + path: '${{ env.FILENAME }}' + destination: 'wake-venv' + headers: |- + x-goog-meta-version: ${{ env.VERSION }} + x-goog-meta-os: windows + x-goog-meta-arch: arm64 + x-goog-meta-python: ${{ matrix.python-version }} + + - name: Upload checksum + uses: 'google-github-actions/upload-cloud-storage@v2' + with: + path: ${{ env.FILENAME }}.sha256 + destination: 'wake-venv' + + - name: Upload signature + uses: 'google-github-actions/upload-cloud-storage@v2' + with: + path: ${{ env.FILENAME }}.sha256.sig + destination: 'wake-venv'