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