aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/release.yaml
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-01-11 20:48:30 +0000
committerAleksey Kladov <[email protected]>2020-01-11 20:50:32 +0000
commit7e1a25f1499b2987cd98f8bd61ee00652deb09c2 (patch)
treef56cd4106ada45ee1c174024340801244f0577fd /.github/workflows/release.yaml
parent7d4a62275d969a134a1f9c80d489f45eddd0b2ae (diff)
Tweak release workflow
Diffstat (limited to '.github/workflows/release.yaml')
-rw-r--r--.github/workflows/release.yaml54
1 files changed, 13 insertions, 41 deletions
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index b14aa6880..49d3ee0e9 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -1,9 +1,8 @@
1name: CI-Release 1name: CI-Release
2on: 2on:
3 pull_request:
4 push: 3 push:
5 branches: 4 branches:
6 - master 5 - release
7 6
8jobs: 7jobs:
9 rust: 8 rust:
@@ -15,7 +14,6 @@ jobs:
15 env: 14 env:
16 RUSTFLAGS: -D warnings 15 RUSTFLAGS: -D warnings
17 CARGO_INCREMENTAL: 0 16 CARGO_INCREMENTAL: 0
18 RUN_SLOW_TESTS: 1
19 RUSTUP_MAX_RETRIES: 10 17 RUSTUP_MAX_RETRIES: 10
20 CARGO_NET_RETRY: 10 18 CARGO_NET_RETRY: 10
21 steps: 19 steps:
@@ -39,47 +37,26 @@ jobs:
39 override: true 37 override: true
40 components: rustfmt, rust-src 38 components: rustfmt, rust-src
41 39
42 - name: Cache cargo registry 40 - name: Build
43 uses: actions/cache@v1
44 with:
45 path: ~/.cargo/registry
46 key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
47
48 - name: Cache cargo index
49 uses: actions/cache@v1
50 with:
51 path: ~/.cargo/git
52 key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
53
54 - name: Cache cargo target dir
55 uses: actions/cache@v1
56 with:
57 path: target
58 key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
59
60 - name: Compile and Test
61 uses: actions-rs/cargo@v1 41 uses: actions-rs/cargo@v1
62 with: 42 with:
63 command: test 43 command: build
64 args: --release --all-targets 44 args: --release --package ra_lsp_server --bin ra_lsp_server
65 45
66 - name: Prepare cache 46 - name: Strip symbols
67 run: cargo xtask pre-cache 47 if: matrix.os == 'ubuntu-latest'
48 run: strip ./target/release/ra_lsp_server
68 49
69 - name: Prepare cache 2 50 - name: Create distribution dir
70 if: matrix.os == 'windows-latest'
71 run: Remove-Item ./target/release/xtask.exe
72
73 - name: Creat distribution dir
74 run: mkdir ./dist 51 run: mkdir ./dist
75 52
76 - name: Copy binaries (non-win) 53 - name: Copy binaries (unix)
77 if: matrix.os != 'windows-latest' 54 if: matrix.os != 'windows-latest'
78 run: cp ./target/release/ra_lsp_server ./dist 55 run: cp ./target/release/ra_lsp_server ./dist
79 56
80 - name: Copy binaries (win) 57 - name: Copy binaries (win)
81 if: matrix.os == 'windows-latest' 58 if: matrix.os == 'windows-latest'
82 run: copy ./target/release/ra_lsp_server.* ./dist 59 run: copy ./target/release/ra_lsp_server.exe ./dist
83 60
84 - name: Upload artifacts 61 - name: Upload artifacts
85 uses: actions/upload-artifact@v1 62 uses: actions/upload-artifact@v1
@@ -90,9 +67,6 @@ jobs:
90 type-script: 67 type-script:
91 name: TypeScript 68 name: TypeScript
92 runs-on: ubuntu-latest 69 runs-on: ubuntu-latest
93 env:
94 CXX: g++-4.9
95 CC: gcc-4.9
96 steps: 70 steps:
97 - name: Checkout repository 71 - name: Checkout repository
98 uses: actions/checkout@v1 72 uses: actions/checkout@v1
@@ -104,14 +78,12 @@ jobs:
104 78
105 - run: npm ci 79 - run: npm ci
106 working-directory: ./editors/code 80 working-directory: ./editors/code
81
107 - run: npm run package --scripts-prepend-node-path 82 - run: npm run package --scripts-prepend-node-path
108 working-directory: ./editors/code 83 working-directory: ./editors/code
109 84
110 - name: Create distribution directory
111 run: mkdir ./dist
112
113 - name: Copy vscode extension 85 - name: Copy vscode extension
114 run: mkdir ./dist/code && cp ./editors/code/*.vsix ./dist/code/ 86 run: mkdir -p ./dist/code && cp ./editors/code/*.vsix ./dist/code/
115 87
116 - name: Copy emacs mode 88 - name: Copy emacs mode
117 run: cp -R ./editors/emacs ./dist/ 89 run: cp -R ./editors/emacs ./dist/
@@ -119,5 +91,5 @@ jobs:
119 - name: Upload artifacts 91 - name: Upload artifacts
120 uses: actions/upload-artifact@v1 92 uses: actions/upload-artifact@v1
121 with: 93 with:
122 name: editors 94 name: editor-plugins
123 path: ./dist 95 path: ./dist