Skip to content

Commit

Permalink
run precompile steps for macos and linux
Browse files Browse the repository at this point in the history
  • Loading branch information
vineelsai26 committed Apr 27, 2024
1 parent 66652f1 commit e536df5
Showing 1 changed file with 71 additions and 1 deletion.
72 changes: 71 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
needs: build
steps:
Expand All @@ -47,6 +47,76 @@ jobs:
- name: Test
run: go test -timeout 3h -v ./...

release_repo:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
needs: test
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GoVersion }}

- name: Configure AWS credentials from Production account
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE }}
aws-region: ${{ vars.AWS_REGION }}

- name: Setup VMN
run: |
git clone https://github.com/vineelsai26/VMN.git
cd VMN
go build
cp vmn /usr/local/bin/vmn
- name: Build Python
run: |
vmn --compile python install 3.12.3
vmn --compile python install 3.11.9
vmn --compile python install 3.10.14
vmn --compile python install 3.9.19
- name: "DRY RUN: Upload Python package to S3"
if: github.ref != 'refs/heads/main'
run: |
OS=$(uname -s)
if [[ $OS == "Linux" ]]; then
cd $HOME/.vmn/python/v3.12.3/ && tar -czvf python-3.12.3.tar.gz * && aws s3 cp python-3.12.3.tar.gz s3://repo.vineelsai.com/linux/generic/amd64/
cd $HOME/.vmn/python/v3.11.9/ && tar -czvf python-3.11.9.tar.gz * && aws s3 cp python-3.11.9.tar.gz s3://repo.vineelsai.com/linux/generic/amd64/
cd $HOME/.vmn/python/v3.10.14/ && tar -czvf python-3.10.14.tar.gz * && aws s3 cp python-3.10.14.tar.gz s3://repo.vineelsai.com/linux/generic/amd64/
cd $HOME/.vmn/python/v3.9.19/ && tar -czvf python-3.9.19.tar.gz * && aws s3 cp python-3.9.19.tar.gz s3://repo.vineelsai.com/linux/generic/amd64/
elif [[ $OS == "Darwin" ]]; then
cd $HOME/.vmn/python/v3.12.3/ && tar -czvf python-3.12.3.tar.gz * && aws s3 cp python-3.12.3.tar.gz s3://repo.vineelsai.com/darwin/generic/arm64/
cd $HOME/.vmn/python/v3.11.9/ && tar -czvf python-3.11.9.tar.gz * && aws s3 cp python-3.11.9.tar.gz s3://repo.vineelsai.com/darwin/generic/arm64/
cd $HOME/.vmn/python/v3.10.14/ && tar -czvf python-3.10.14.tar.gz * && aws s3 cp python-3.10.14.tar.gz s3://repo.vineelsai.com/darwin/generic/arm64/
cd $HOME/.vmn/python/v3.9.19/ && tar -czvf python-3.9.19.tar.gz * && aws s3 cp python-3.9.19.tar.gz s3://repo.vineelsai.com/darwin/generic/arm64/
fi
- name: Upload Python package to S3
if: github.ref == 'refs/heads/main'
run: |
OS=$(uname -s)
if [[ $OS == "Linux" ]]; then
cd $HOME/.vmn/python/v3.12.3/ && tar -czvf python-3.12.3.tar.gz * && aws s3 cp python-3.12.3.tar.gz s3://repo.vineelsai.com/linux/generic/amd64/
cd $HOME/.vmn/python/v3.11.9/ && tar -czvf python-3.11.9.tar.gz * && aws s3 cp python-3.11.9.tar.gz s3://repo.vineelsai.com/linux/generic/amd64/
cd $HOME/.vmn/python/v3.10.14/ && tar -czvf python-3.10.14.tar.gz * && aws s3 cp python-3.10.14.tar.gz s3://repo.vineelsai.com/linux/generic/amd64/
cd $HOME/.vmn/python/v3.9.19/ && tar -czvf python-3.9.19.tar.gz * && aws s3 cp python-3.9.19.tar.gz s3://repo.vineelsai.com/linux/generic/amd64/
elif [[ $OS == "Darwin" ]]; then
cd $HOME/.vmn/python/v3.12.3/ && tar -czvf python-3.12.3.tar.gz * && aws s3 cp python-3.12.3.tar.gz s3://repo.vineelsai.com/darwin/generic/arm64/
cd $HOME/.vmn/python/v3.11.9/ && tar -czvf python-3.11.9.tar.gz * && aws s3 cp python-3.11.9.tar.gz s3://repo.vineelsai.com/darwin/generic/arm64/
cd $HOME/.vmn/python/v3.10.14/ && tar -czvf python-3.10.14.tar.gz * && aws s3 cp python-3.10.14.tar.gz s3://repo.vineelsai.com/darwin/generic/arm64/
cd $HOME/.vmn/python/v3.9.19/ && tar -czvf python-3.9.19.tar.gz * && aws s3 cp python-3.9.19.tar.gz s3://repo.vineelsai.com/darwin/generic/arm64/
fi
release:
name: "Tagged Release"
runs-on: "ubuntu-latest"
Expand Down

0 comments on commit e536df5

Please sign in to comment.