Skip to content

Commit

Permalink
👷 Update conda CI
Browse files Browse the repository at this point in the history
  • Loading branch information
michprev committed Jun 22, 2024
1 parent 45157a0 commit 008e565
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 18 deletions.
53 changes: 36 additions & 17 deletions .github/workflows/conda-pack-arm.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
name: Build conda environments
name: Build linux-arm64 conda environment

on: [push]

jobs:
build-arm-linux:
strategy:
matrix:
python-version: ["3.10"]
runs-on: ubuntu-latest

steps:
- name: Set up variables
id: vars
shell: bash -el {0}
run: |
echo "FILENAME=wake-${{ runner.os }}-ARM64.tar.gz" >> $GITHUB_ENV
- uses: actions/checkout@v2

- name: Set up QEMU
Expand All @@ -29,20 +26,42 @@ jobs:
source activate wake && \
conda install -c conda-forge conda-pack -y && \
python -m pip install . && \
conda-pack -n wake -o ${{ env.FILENAME }} && \
sha256sum ${{ env.FILENAME }} > ${{ env.FILENAME }}.sha256 && \
VERSION=\$(wake --version) && \
FILENAME=wake-\${VERSION}-linux-arm64.tar.gz && \
echo \"FILENAME=\${FILENAME}\" >> \$GITHUB_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 ${{ env.FILENAME }}.sha256.sig ${{ env.FILENAME }}.sha256
openssl dgst -sha256 -sign key.pem -out \${FILENAME}.sha256.sig \${FILENAME}.sha256
"
- name: Adjust permissions
run: sudo chmod -R 777 ${{ github.workspace }}

- name: Upload files
uses: actions/upload-artifact@v2
- 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: ${{ env.OS }}
x-goog-meta-arch: ${{ env.ARCH }}
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:
name: wake-${{ runner.os }}-ARM64
path: |
${{ env.FILENAME }}
${{ env.FILENAME }}.sha256
${{ env.FILENAME }}.sha256.sig
path: ${{ env.FILENAME }}.sha256.sig
destination: 'wake-venv'
2 changes: 1 addition & 1 deletion .github/workflows/conda-pack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build conda environments
name: Build native conda environments

on: [push]

Expand Down

0 comments on commit 008e565

Please sign in to comment.