Skip to content

Commit

Permalink
fixing CI
Browse files Browse the repository at this point in the history
Signed-off-by: danbugs <[email protected]>
  • Loading branch information
danbugs committed Dec 26, 2023
1 parent 2c2616f commit 942c872
Showing 1 changed file with 28 additions and 6 deletions.
34 changes: 28 additions & 6 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:

- name: Clippy check
run: cargo clippy -p smithe_backend -p smithe_database -p smithe_lib -p startgg -- -D warnings

build:
needs: lint-and-format
strategy:
Expand Down Expand Up @@ -66,23 +67,44 @@ jobs:
override: true
target: ${{ matrix.target }}

- if: matrix.os == 'windows-latest'
name: Install PostgreSQL
uses: ikalnytskyi/action-setup-postgres@v4
- if: matrix.os == 'ubuntu-20.04'
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- if: matrix.os == 'windows-latest'
- if: matrix.os == 'ubuntu-20.04'
name: Login to DockerHub
uses: docker/login-action@v3
with:
username: danstaken
password: ${{ secrets.DOCKER_PASSWORD }}

- if: matrix.os == 'ubuntu-20.04'
name: Build and push multi-architecture Docker image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile-BuildArm64
push: true
tags: danstaken/rust-build-env-arm64:latest
platforms: linux/arm64

- if: matrix.os == 'ubuntu-20.04'
name: Install cross
run: cargo install cross

# Conditional step for standard Rust build for non-arm64 targets
- if: matrix.os == 'windows-latest'
- if: matrix.os == 'ubuntu-20.04'
name: Cross build for arm64
run: cross build --release --target aarch64-unknown-linux-gnu
env:
SERVER_ADDRESS: 'http://127.0.0.1:8080'

- if: matrix.os == 'windows-latest'
name: Install PostgreSQL
uses: ikalnytskyi/action-setup-postgres@v4

- name: Build
run: cargo build --release --target ${{ matrix.target }}
run: build --release --target ${{ matrix.target }}
env:
SERVER_ADDRESS: 'http://127.0.0.1:8080'

Expand Down

0 comments on commit 942c872

Please sign in to comment.