-
Notifications
You must be signed in to change notification settings - Fork 50
57 lines (43 loc) · 1.49 KB
/
nightly.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Standards Nightly Tests
on:
schedule:
- cron: '0 0 * * *' # Run every day at midnight UTC
pull_request:
env:
CARGO_TERM_COLOR: always
REGISTRY: ghcr.io
jobs:
standards-nightly-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rustfmt
- name: Init cache
uses: Swatinem/rust-cache@v2
- name: Install a modern linker (mold)
uses: rui314/setup-mold@v1
- name: Force Rust to use mold globally for compilation
run: |
touch ~/.cargo/config.toml
echo "[target.x86_64-unknown-linux-gnu]" > ~/.cargo/config.toml
echo 'linker = "clang"' >> ~/.cargo/config.toml
echo 'rustflags = ["-C", "link-arg=-fuse-ld=/usr/local/bin/mold"]' >> ~/.cargo/config.toml
- name: Install Fuel toolchain
uses: FuelLabs/[email protected]
with:
toolchain: nightly
- name: Check Sway Formatting Standards
run: forc fmt --path standards --check
- name: Build All Standards
run: forc build --error-on-warnings --path standards
- name: Check Sway Formatting Examples
run: forc fmt --path examples --check
- name: Build All Examples
run: forc build --path examples --release
- name: Run Cargo Tests
run: cargo test