Skip to content

Commit

Permalink
test build on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
altmannmarcelo committed Aug 13, 2024
1 parent fa73e31 commit 02ed5d6
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/build_arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build

on: [push, pull_request]

jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- name: build docker base image
run: docker build -t rust-compile-image .

- name: Run the build process with Docker
uses: addnab/docker-run-action@v3
with:
image: rust-compile-image
options: -v "${{ github.workspace }}":/usr/src/myapp -w /usr/src/myapp
run: |
cargo build --release
cargo generate-rpm
cargo deb
- name: Save RPM / DEB name
run: |
echo "rpm_name=$(ls target/generate-rpm/)" >> "$GITHUB_ENV"
echo "deb_name=$(ls target/debian/ -I *-stripped)" >> "$GITHUB_ENV"
- name: Upload RPM
uses: actions/upload-artifact@v4
with:
path: target/generate-rpm/
name: ${{ env.rpm_name }}

- name: Upload Deb
uses: actions/upload-artifact@v4
with:
path: target/debian/${{ env.deb_name }}
name: ${{ env.deb_name }}
File renamed without changes.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Use the latest official Rust
FROM rust:latest

# install dependencies
RUN cargo install cargo-generate-rpm cargo-deb

0 comments on commit 02ed5d6

Please sign in to comment.