cleaner state #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-linux: | |
name: Linux GLIBC_2_15 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Build linux | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: i686-unknown-linux-gnu | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
use-cross: true # cross uses glibc 2.15 | |
command: build | |
args: --target i686-unknown-linux-gnu --release | |
- name: Upload Linux Release Asset | |
id: upload-linux-release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: ./target/i686-unknown-linux-gnu/release/libsamp_precise_timers.so | |
replacesArtifacts: false | |
token: ${{ secrets.GITHUB_TOKEN }} | |
allowUpdates: true | |
draft: true | |
omitBody: true | |
tag: ${{ github.ref }} | |
commit: ${{ github.ref }} | |
build-windows: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
os: [windows-latest] | |
rust: [stable] | |
steps: | |
- uses: hecrj/setup-rust-action@v1 | |
with: | |
rust-version: ${{ matrix.rust }} | |
- uses: actions/checkout@v2 | |
- name: Build for Windows | |
run: rustup target add i686-pc-windows-msvc && cargo build --release --target i686-pc-windows-msvc | |
- name: Upload Windows Release Asset | |
id: upload-windows-release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: .\target\i686-pc-windows-msvc\release\samp_precise_timers.dll | |
replacesArtifacts: false | |
token: ${{ secrets.GITHUB_TOKEN }} | |
allowUpdates: true | |
draft: true | |
omitBody: true | |
tag: ${{ github.ref }} | |
commit: ${{ github.ref }} |