Skip to content

Commit

Permalink
Create cross_comp_ubuntu.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
RGGH authored Nov 13, 2024
1 parent 6d6b967 commit 1c6522b
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/cross_comp_ubuntu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Rust Cross Compile for Ubuntu Linux

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

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
component: rustfmt

- name: Install cross
run: cargo install cross

- name: Build for Ubuntu Linux (x86_64)
run: cross build --target x86_64-unknown-linux-gnu --release

- name: Upload artifact for Ubuntu Linux
uses: actions/upload-artifact@v3
with:
name: ubuntu-build
path: target/x86_64-unknown-linux-gnu/release/mif

- name: Create GitHub Release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: target/x86_64-unknown-linux-gnu/release/mif
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload release assets
uses: softprops/action-gh-release@v1
with:
files: target/x86_64-unknown-linux-gnu/release/mif
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 1c6522b

Please sign in to comment.