-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 1.14 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Rust
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: [self-hosted, garm]
steps:
- uses: actions/checkout@v4
- name: Symlink
run: mkdir -p /home/runner/work/${{ github.event.repository.name }}/ && ln -s ${{ github.workspace }} /home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}
- name: ubuntu mirror
run: sudo sed -i.bak -r 's@http://(jp\.)?archive\.ubuntu\.com/ubuntu/?@https://ftp.udx.icscoe.jp/Linux/ubuntu/@g' /etc/apt/sources.list
- name: Install dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: sudo apt-get update && sudo apt-get install -y pkg-config libssl-dev
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: "/home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}"
- name: Build
env:
SQLX_OFFLINE: true
run: cargo build --verbose
- name: Run tests
env:
SQLX_OFFLINE: true
run: cargo test --verbose