Skip to content

Commit

Permalink
⚗️ Conda build windows arm
Browse files Browse the repository at this point in the history
  • Loading branch information
michprev committed Jun 22, 2024
1 parent 87ae2bb commit 23f0468
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/conda-pack-windows-arm.yaml
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit 23f0468

Please sign in to comment.