Skip to content

Commit a3b4078

Browse files
committed
Intial commit
0 parents  commit a3b4078

File tree

8 files changed

+4253
-0
lines changed

8 files changed

+4253
-0
lines changed

.github/workflows/rust.yml

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
on: [push, pull_request, workflow_dispatch]
2+
3+
name: CI
4+
5+
jobs:
6+
check:
7+
name: Check
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: actions-rs/toolchain@v1
12+
with:
13+
profile: minimal
14+
toolchain: stable
15+
override: true
16+
- uses: actions-rs/cargo@v1
17+
with:
18+
command: check
19+
args: --all-features
20+
21+
fmt:
22+
name: Rustfmt
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: actions-rs/toolchain@v1
27+
with:
28+
profile: minimal
29+
toolchain: stable
30+
override: true
31+
components: rustfmt
32+
- uses: actions-rs/cargo@v1
33+
with:
34+
command: fmt
35+
args: --all -- --check
36+
37+
clippy:
38+
name: Clippy
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: actions-rs/toolchain@v1
43+
with:
44+
profile: minimal
45+
toolchain: stable
46+
override: true
47+
components: clippy
48+
- uses: actions-rs/cargo@v1
49+
with:
50+
command: clippy
51+
args: -- -D warnings
52+
53+
build:
54+
runs-on: ${{ matrix.os }}
55+
strategy:
56+
fail-fast: false
57+
matrix:
58+
include:
59+
- os: macos-latest
60+
TARGET: aarch64-apple-darwin
61+
62+
- os: macos-latest
63+
TARGET: x86_64-apple-darwin
64+
65+
- os: ubuntu-latest
66+
TARGET: arm-unknown-linux-musleabihf
67+
68+
- os: ubuntu-latest
69+
TARGET: armv7-unknown-linux-musleabihf
70+
71+
- os: ubuntu-latest
72+
TARGET: x86_64-unknown-linux-musl
73+
74+
- os: windows-latest
75+
TARGET: x86_64-pc-windows-msvc
76+
EXTENSION: .exe
77+
78+
steps:
79+
- name: Building ${{ matrix.TARGET }}
80+
run: echo "${{ matrix.TARGET }}"
81+
82+
- uses: actions/checkout@master
83+
- uses: actions-rs/[email protected]
84+
with:
85+
toolchain: stable
86+
target: ${{ matrix.TARGET }}
87+
override: true
88+
89+
- uses: actions-rs/cargo@v1
90+
with:
91+
use-cross: true
92+
command: build
93+
args: --verbose --release --target=${{ matrix.TARGET }}
94+
95+
- name: Rename
96+
run: cp target/${{ matrix.TARGET }}/release/oracle${{ matrix.EXTENSION }} oracle-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
97+
98+
- uses: actions/upload-artifact@master
99+
with:
100+
name: oracle-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
101+
path: oracle-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
102+
103+
- uses: svenstaro/upload-release-action@v2
104+
name: Upload binaries to release
105+
if: ${{ github.event_name == 'push' }}
106+
with:
107+
repo_token: ${{ secrets.GITHUB_TOKEN }}
108+
file: oracle-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
109+
asset_name: oracle-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
110+
tag: ${{ github.ref }}
111+
prerelease: ${{ !startsWith(github.ref, 'refs/tags/') }}
112+
overwrite: true

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/target
2+
.idea

0 commit comments

Comments
 (0)