aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yaml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/ci.yaml')
-rw-r--r--.github/workflows/ci.yaml83
1 files changed, 52 insertions, 31 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index ed9191c49..2acd44012 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -16,25 +16,25 @@ env:
16 RUSTUP_MAX_RETRIES: 10 16 RUSTUP_MAX_RETRIES: 10
17 17
18jobs: 18jobs:
19 rust-audit: 19 # rust-audit:
20 name: Audit Rust vulnerabilities 20 # name: Audit Rust vulnerabilities
21 runs-on: ubuntu-latest 21 # runs-on: ubuntu-latest
22 steps: 22 # steps:
23 - name: Checkout repository 23 # - name: Checkout repository
24 uses: actions/checkout@v2 24 # uses: actions/checkout@v2
25 25
26 - uses: actions-rs/[email protected] 26 # - uses: actions-rs/[email protected]
27 with: 27 # with:
28 crate: cargo-audit 28 # crate: cargo-audit
29 use-tool-cache: true 29 # use-tool-cache: true
30 30
31 - run: cargo audit 31 # - run: cargo audit
32 32
33 rust: 33 rust:
34 name: Rust 34 name: Rust
35 runs-on: ${{ matrix.os }} 35 runs-on: ${{ matrix.os }}
36 env: 36 env:
37 CC: deny_c 37 CC: deny_c
38 38
39 strategy: 39 strategy:
40 fail-fast: false 40 fail-fast: false
@@ -61,29 +61,22 @@ jobs:
61 override: true 61 override: true
62 components: rustfmt, rust-src 62 components: rustfmt, rust-src
63 63
64 - if: matrix.os == 'ubuntu-latest' 64 - name: Cache cargo directories
65 run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/ 65 uses: actions/cache@v2
66
67 - name: Cache cargo registry
68 uses: actions/cache@v1
69 with: 66 with:
70 path: ~/.cargo/registry 67 path: |
71 key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} 68 ~/.cargo/registry
72 69 ~/.cargo/git
73 - name: Cache cargo index 70 key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
74 uses: actions/cache@v1
75 with:
76 path: ~/.cargo/git
77 key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
78 71
79 - name: Cache cargo target dir 72 - name: Cache cargo target dir
80 uses: actions/cache@v1 73 uses: actions/cache@v2
81 with: 74 with:
82 path: target 75 path: target
83 key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} 76 key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
84 77
85 - name: Compile 78 - name: Compile
86 run: cargo test --no-run 79 run: cargo test --no-run --locked
87 80
88 - name: Test 81 - name: Test
89 run: cargo test 82 run: cargo test
@@ -95,6 +88,34 @@ jobs:
95 if: matrix.os == 'windows-latest' 88 if: matrix.os == 'windows-latest'
96 run: Remove-Item ./target/debug/xtask.exe, ./target/debug/deps/xtask.exe 89 run: Remove-Item ./target/debug/xtask.exe, ./target/debug/deps/xtask.exe
97 90
91 # Weird target to catch non-portable code
92 rust-power:
93 name: Rust Power
94 runs-on: ubuntu-latest
95
96 steps:
97 - name: Checkout repository
98 uses: actions/checkout@v2
99
100 - name: Install Rust toolchain
101 uses: actions-rs/toolchain@v1
102 with:
103 toolchain: stable
104 profile: minimal
105 override: true
106 target: 'powerpc-unknown-linux-gnu'
107
108 - name: Cache cargo directories
109 uses: actions/cache@v2
110 with:
111 path: |
112 ~/.cargo/registry
113 ~/.cargo/git
114 key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
115
116 - name: Check
117 run: cargo check --target=powerpc-unknown-linux-gnu --all-targets
118
98 typescript: 119 typescript:
99 name: TypeScript 120 name: TypeScript
100 strategy: 121 strategy:
@@ -103,7 +124,7 @@ jobs:
103 os: [ubuntu-latest, windows-latest, macos-latest] 124 os: [ubuntu-latest, windows-latest, macos-latest]
104 125
105 runs-on: ${{ matrix.os }} 126 runs-on: ${{ matrix.os }}
106 127
107 steps: 128 steps:
108 - name: Checkout repository 129 - name: Checkout repository
109 uses: actions/checkout@v2 130 uses: actions/checkout@v2
@@ -116,9 +137,9 @@ jobs:
116 - run: npm ci 137 - run: npm ci
117 working-directory: ./editors/code 138 working-directory: ./editors/code
118 139
119 - run: npm audit || { sleep 10 && npm audit; } || { sleep 30 && npm audit; } 140# - run: npm audit || { sleep 10 && npm audit; } || { sleep 30 && npm audit; }
120 if: runner.os == 'Linux' 141# if: runner.os == 'Linux'
121 working-directory: ./editors/code 142# working-directory: ./editors/code
122 143
123 - run: npm run lint 144 - run: npm run lint
124 working-directory: ./editors/code 145 working-directory: ./editors/code