Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwhite committed Mar 12, 2024
1 parent 4be4225 commit 5ad0343
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 132 deletions.
63 changes: 0 additions & 63 deletions .github/workflows/lithops-aws-images.yml

This file was deleted.

69 changes: 0 additions & 69 deletions .github/workflows/lithops-gcp-images.yml

This file was deleted.

85 changes: 85 additions & 0 deletions .github/workflows/lithops-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Lithops images

on:
pull_request:
push:
branches:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python-version: "3.11"
requirements-file: ci/requirements-lithops-aws.txt
lithops-config: .github/workflows/.lithops_config_aws
lithops-backend: aws_lambda
lithops-build-file: ci/docker/Dockerfile_aws_lambda_main
lithops-memory: 2000
- os: ubuntu-latest
python-version: "3.11"
requirements-file: ci/requirements-lithops-gcp.txt
lithops-config: .github/workflows/.lithops_config_gcp
lithops-backend: gcp_functions
lithops-build-file: ci/requirements-lithops-gcp.txt
lithops-memory: 2048

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Copy lithops configuration templates
run: |
cp $GITHUB_WORKSPACE/.github/workflows/.lithops_config_aws.template $GITHUB_WORKSPACE/.github/workflows/.lithops_config_aws
cp $GITHUB_WORKSPACE/.github/workflows/.lithops_config_gcp.template $GITHUB_WORKSPACE/.github/workflows/.lithops_config_gcp
- name: Google auth
id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'
create_credentials_file: true

- name: Configure lithops AWS
uses: microsoft/variable-substitution@v1
with:
files: ${{ github.workspace }}/.github/workflows/.lithops_config_aws
env:
aws.access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws.secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Configure lithops GCP
uses: microsoft/variable-substitution@v1
with:
files: ${{ github.workspace }}/.github/workflows/.lithops_config_gcp
env:
gcp.credentials_path: ${{ steps.auth.outputs.credentials_file_path }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install -r ${{ matrix.requirements-file }}
- name: Build and deploy images
env:
LITHOPS_CONFIG_FILE: ${{ github.workspace }}/${{ matrix.lithops-config }}
run: |
lithops runtime build -b ${{ matrix.lithops-backend }} -f ${{ matrix.lithops-build-file }} cubed-runtime-main
lithops runtime deploy -b ${{ matrix.lithops-backend }} --memory ${{ matrix.lithops-memory }} cubed-runtime-main

0 comments on commit 5ad0343

Please sign in to comment.