-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |