diff options
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/ci.yaml | 82 |
1 files changed, 54 insertions, 28 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ed9191c49..20663196d 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 | ||
18 | jobs: | 18 | jobs: |
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 |
@@ -64,26 +64,22 @@ jobs: | |||
64 | - if: matrix.os == 'ubuntu-latest' | 64 | - if: matrix.os == 'ubuntu-latest' |
65 | run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/ | 65 | run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/ |
66 | 66 | ||
67 | - name: Cache cargo registry | 67 | - name: Cache cargo directories |
68 | uses: actions/cache@v1 | 68 | uses: actions/cache@v2 |
69 | with: | ||
70 | path: ~/.cargo/registry | ||
71 | key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||
72 | |||
73 | - name: Cache cargo index | ||
74 | uses: actions/cache@v1 | ||
75 | with: | 69 | with: |
76 | path: ~/.cargo/git | 70 | path: | |
77 | key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | 71 | ~/.cargo/registry |
72 | ~/.cargo/git | ||
73 | key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
78 | 74 | ||
79 | - name: Cache cargo target dir | 75 | - name: Cache cargo target dir |
80 | uses: actions/cache@v1 | 76 | uses: actions/cache@v2 |
81 | with: | 77 | with: |
82 | path: target | 78 | path: target |
83 | key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | 79 | key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} |
84 | 80 | ||
85 | - name: Compile | 81 | - name: Compile |
86 | run: cargo test --no-run | 82 | run: cargo test --no-run --locked |
87 | 83 | ||
88 | - name: Test | 84 | - name: Test |
89 | run: cargo test | 85 | run: cargo test |
@@ -95,6 +91,36 @@ jobs: | |||
95 | if: matrix.os == 'windows-latest' | 91 | if: matrix.os == 'windows-latest' |
96 | run: Remove-Item ./target/debug/xtask.exe, ./target/debug/deps/xtask.exe | 92 | run: Remove-Item ./target/debug/xtask.exe, ./target/debug/deps/xtask.exe |
97 | 93 | ||
94 | # Weird target to catch non-portable code | ||
95 | rust-power: | ||
96 | name: Rust Power | ||
97 | runs-on: ubuntu-latest | ||
98 | |||
99 | steps: | ||
100 | - name: Checkout repository | ||
101 | uses: actions/checkout@v2 | ||
102 | |||
103 | - name: Install Rust toolchain | ||
104 | uses: actions-rs/toolchain@v1 | ||
105 | with: | ||
106 | toolchain: stable | ||
107 | profile: minimal | ||
108 | override: true | ||
109 | target: 'powerpc-unknown-linux-gnu' | ||
110 | |||
111 | - run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/ | ||
112 | |||
113 | - name: Cache cargo directories | ||
114 | uses: actions/cache@v2 | ||
115 | with: | ||
116 | path: | | ||
117 | ~/.cargo/registry | ||
118 | ~/.cargo/git | ||
119 | key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
120 | |||
121 | - name: Check | ||
122 | run: cargo check --target=powerpc-unknown-linux-gnu --all-targets | ||
123 | |||
98 | typescript: | 124 | typescript: |
99 | name: TypeScript | 125 | name: TypeScript |
100 | strategy: | 126 | strategy: |
@@ -103,7 +129,7 @@ jobs: | |||
103 | os: [ubuntu-latest, windows-latest, macos-latest] | 129 | os: [ubuntu-latest, windows-latest, macos-latest] |
104 | 130 | ||
105 | runs-on: ${{ matrix.os }} | 131 | runs-on: ${{ matrix.os }} |
106 | 132 | ||
107 | steps: | 133 | steps: |
108 | - name: Checkout repository | 134 | - name: Checkout repository |
109 | uses: actions/checkout@v2 | 135 | uses: actions/checkout@v2 |
@@ -116,9 +142,9 @@ jobs: | |||
116 | - run: npm ci | 142 | - run: npm ci |
117 | working-directory: ./editors/code | 143 | working-directory: ./editors/code |
118 | 144 | ||
119 | - run: npm audit || { sleep 10 && npm audit; } || { sleep 30 && npm audit; } | 145 | # - run: npm audit || { sleep 10 && npm audit; } || { sleep 30 && npm audit; } |
120 | if: runner.os == 'Linux' | 146 | # if: runner.os == 'Linux' |
121 | working-directory: ./editors/code | 147 | # working-directory: ./editors/code |
122 | 148 | ||
123 | - run: npm run lint | 149 | - run: npm run lint |
124 | working-directory: ./editors/code | 150 | working-directory: ./editors/code |