|
13 | 13 | runs-on: ubuntu-18.04 |
14 | 14 | strategy: |
15 | 15 | matrix: |
16 | | - target: |
17 | | - [ |
18 | | - x86_64-unknown-linux-gnu, |
19 | | - i686-unknown-linux-gnu, |
20 | | - aarch64-unknown-linux-gnu, |
21 | | - armv7-unknown-linux-gnueabihf, |
22 | | - ] |
| 16 | + target: [x86_64-unknown-linux-gnu] |
23 | 17 | steps: |
24 | 18 | - name: Checkout |
25 | 19 | uses: actions/checkout@v2 |
@@ -58,114 +52,3 @@ jobs: |
58 | 52 | # build and deploy CLI |
59 | 53 | cargo build -p tmc-langs-cli --release --target ${{ matrix.target }} |
60 | 54 | gsutil cp target/${{ matrix.target }}/release/tmc-langs-cli gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-cli-${{ matrix.target }}-$TAG |
61 | | -
|
62 | | - # build and deploy Node module |
63 | | - npm --prefix ./bindings/tmc-langs-node install |
64 | | - npm --prefix ./bindings/tmc-langs-node run build -- --release --target ${{ matrix.target }} |
65 | | - gsutil cp bindings/tmc-langs-node/ts/functions.node gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-${{ matrix.target }}-$TAG.node |
66 | | -
|
67 | | - windows: |
68 | | - runs-on: windows-latest |
69 | | - strategy: |
70 | | - matrix: |
71 | | - target: [i686-pc-windows-msvc, x86_64-pc-windows-msvc] |
72 | | - steps: |
73 | | - - name: Checkout |
74 | | - uses: actions/checkout@v2 |
75 | | - - name: Install Rust |
76 | | - uses: actions-rs/toolchain@v1 |
77 | | - with: |
78 | | - profile: minimal |
79 | | - toolchain: stable |
80 | | - - name: Cache |
81 | | - uses: Swatinem/rust-cache@v1 |
82 | | - - name: Node |
83 | | - uses: actions/setup-node@v2 |
84 | | - with: |
85 | | - node-version: "16" |
86 | | - - name: GCloud |
87 | | - uses: google-github-actions/setup-gcloud@master |
88 | | - with: |
89 | | - project_id: ${{ secrets.GCP_PROJECT_ID }} |
90 | | - service_account_key: ${{ secrets.GCP_SA_KEY }} |
91 | | - |
92 | | - - name: Build |
93 | | - run: | |
94 | | - rustup target add ${{ matrix.target }} |
95 | | - $env:RUSTFLAGS="-C target-feature=+crt-static" # crt-static is set with RUSTFLAGS to statically link MSVCRT (VCRUNTIME140.dll) |
96 | | - cargo build -p tmc-langs-cli --release --target ${{ matrix.target }} |
97 | | - cd ./bindings/tmc-langs-node && npm install && npm run build -- --release --target ${{ matrix.target }} |
98 | | - - name: Deploy |
99 | | - run: | |
100 | | - $env:python_version=$(python -c 'import sys; print(\".\".join(map(str, sys.version_info[:3])))') |
101 | | - $env:CLOUDSDK_PYTHON="C:\hostedtoolcache\windows\Python\$env:python_version\x64\python" |
102 | | - gsutil cp target/${{ matrix.target }}/release/tmc-langs-cli.exe gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-cli-${{ matrix.target }}-$Env:TAG.exe |
103 | | - gsutil cp bindings/tmc-langs-node/ts/functions.node gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-${{ matrix.target }}-$Env:TAG.node |
104 | | -
|
105 | | - macos: |
106 | | - runs-on: macos-10.15 |
107 | | - steps: |
108 | | - - name: Checkout |
109 | | - uses: actions/checkout@v2 |
110 | | - - name: Install Rust |
111 | | - uses: actions-rs/toolchain@v1 |
112 | | - with: |
113 | | - profile: minimal |
114 | | - toolchain: stable |
115 | | - - name: Cache |
116 | | - uses: Swatinem/rust-cache@v1 |
117 | | - - name: Node |
118 | | - uses: actions/setup-node@v2 |
119 | | - with: |
120 | | - node-version: "16" |
121 | | - - name: GCloud |
122 | | - uses: google-github-actions/setup-gcloud@master |
123 | | - with: |
124 | | - project_id: ${{ secrets.GCP_PROJECT_ID }} |
125 | | - service_account_key: ${{ secrets.GCP_SA_KEY }} |
126 | | - |
127 | | - - name: Cargo build |
128 | | - run: | |
129 | | - cargo build -p tmc-langs-cli --release |
130 | | - npm --prefix ./bindings/tmc-langs-node install |
131 | | - npm run --prefix ./bindings/tmc-langs-node build -- --release |
132 | | - - name: Sign |
133 | | - run: codesign --force -s - target/release/tmc-langs-cli |
134 | | - - name: Deploy |
135 | | - run: | |
136 | | - gsutil cp target/release/tmc-langs-cli gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-cli-x86_64-apple-darwin-$TAG |
137 | | - gsutil cp bindings/tmc-langs-node/ts/functions.node gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-x86_64-apple-darwin-$TAG.node |
138 | | -
|
139 | | - macos-11: |
140 | | - runs-on: macos-11 |
141 | | - steps: |
142 | | - - name: Checkout |
143 | | - uses: actions/checkout@v2 |
144 | | - - name: Install Rust |
145 | | - uses: actions-rs/toolchain@v1 |
146 | | - with: |
147 | | - profile: minimal |
148 | | - toolchain: stable |
149 | | - - name: Cache |
150 | | - uses: Swatinem/rust-cache@v1 |
151 | | - - name: Node |
152 | | - uses: actions/setup-node@v2 |
153 | | - with: |
154 | | - node-version: "16" |
155 | | - - name: GCloud |
156 | | - uses: google-github-actions/setup-gcloud@master |
157 | | - with: |
158 | | - project_id: ${{ secrets.GCP_PROJECT_ID }} |
159 | | - service_account_key: ${{ secrets.GCP_SA_KEY }} |
160 | | - |
161 | | - - name: Cargo build |
162 | | - run: | |
163 | | - cargo build -p tmc-langs-cli --release |
164 | | - npm --prefix ./bindings/tmc-langs-node install |
165 | | - npm run --prefix ./bindings/tmc-langs-node build -- --release |
166 | | - - name: Sign |
167 | | - run: codesign --force -s - target/release/tmc-langs-cli |
168 | | - - name: Deploy |
169 | | - run: | |
170 | | - gsutil cp target/release/tmc-langs-cli gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-cli-aarch64-apple-darwin-$TAG |
171 | | - gsutil cp bindings/tmc-langs-node/ts/functions.node gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-aarch64-apple-darwin-$TAG.node |
0 commit comments