1
0
Fork 0
This repository has been archived on 2024-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
autoconfig/.github/workflows/rust.yml

75 lines
1.9 KiB
YAML
Raw Normal View History

2021-07-24 13:46:56 +02:00
name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
linux_job:
2021-07-24 13:46:56 +02:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache build
uses: actions/cache@v2
with:
path: ~/target
key: ${{ runner.os }}-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ hashFiles('**/Cargo.lock') }}
${{ runner.os }}-build-
${{ runner.os }}-
- run: cargo build --release
- run: cargo test --release
- name: Upload build file
uses: actions/upload-artifact@v2
with:
name: linux
path: target/release/autoconfig
windows_job:
runs-on: windows-latest
2021-07-24 13:46:56 +02:00
steps:
2021-07-24 13:54:50 +02:00
- uses: actions/checkout@v2
- name: Cache build
uses: actions/cache@v2
2021-07-24 13:46:56 +02:00
with:
path: ~/target
key: ${{ runner.os }}-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ hashFiles('**/Cargo.lock') }}
${{ runner.os }}-build-
${{ runner.os }}-
- run: cargo build --release
- run: cargo test --release
- name: Upload build file
uses: actions/upload-artifact@v2
with:
name: windows
path: target/release/autoconfig.exe
2021-07-24 14:45:47 +02:00
macos_job:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Cache build
uses: actions/cache@v2
with:
path: ~/target
key: ${{ runner.os }}-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ hashFiles('**/Cargo.lock') }}
${{ runner.os }}-build-
${{ runner.os }}-
- run: cargo build --release
- run: cargo test --release
- name: Upload build file
uses: actions/upload-artifact@v2
with:
name: macos
path: target/release/autoconfig