Skip to content

Commit

Permalink
Merge pull request #5 from oramasearch/fix-ci
Browse files Browse the repository at this point in the history
Update rust.yml
  • Loading branch information
allevo authored Oct 31, 2024
2 parents 45d16fd + 6eea505 commit 2e926e4
Show file tree
Hide file tree
Showing 6 changed files with 115 additions and 5,935 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Rust

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

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: apt-get update
run: sudo apt-get update
- name: apt-get install
run: |
sudo apt-get install -y libssl3 pkg-config libssl-dev g++ build-essential ca-certificates
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: cargo-
- name: Install target
run: rustup target add x86_64-unknown-linux-gnu
- name: Environment
run: |
gcc --version
g++ --version
rustc --version
cargo --version
- name: Build
run: |
cargo check --target x86_64-unknown-linux-gnu
cargo fmt -- --check
cargo clippy --target x86_64-unknown-linux-gnu -- -D warnings
cargo build --target x86_64-unknown-linux-gnu
56 changes: 56 additions & 0 deletions .github/workflows/rust-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Rust

on:
release:
types: [created]

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: apt-get update
run: sudo apt-get update
- name: apt-get install
run: |
sudo apt-get install -y libssl3 pkg-config libssl-dev g++ build-essential ca-certificates
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: cargo-
- name: Install target
run: rustup target add x86_64-unknown-linux-gnu
- name: Environment
run: |
gcc --version
g++ --version
rustc --version
cargo --version
- name: Build
run: |
cargo build --release --target x86_64-unknown-linux-gnu -p rustorama
ls -lha target/
ls -lha target/x86_64-unknown-linux-gnu
ls -lha target/x86_64-unknown-linux-gnu/release
- name: Upload Linux x86_64-unknown-linux-gnu
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./target/x86_64-unknown-linux-gnu/release/rustorama
asset_name: rustorama-linux-x86_64-unknown-linux-gnu
40 changes: 0 additions & 40 deletions .github/workflows/rust.yml

This file was deleted.

5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/target


posting_storage
.idea
.idea

Cargo.lock
Loading

0 comments on commit 2e926e4

Please sign in to comment.