This repository has been archived by the owner on Jul 4, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement github actions to build & test bindings on Windows and uplo…
…ad (#411) prebuilds on creating a new release
- Loading branch information
Showing
5 changed files
with
117 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Build & Test (Windows) | ||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Prepare | ||
run: | | ||
rustc -vV | ||
rustup -vV | ||
cargo -vV | ||
npm --version | ||
node --version | ||
- name: Pull submodule | ||
run: npm run submodule | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ env.APPDATA }}/npm-cache # npm cache files are stored in `~/.npm` on Linux/macOS | ||
key: ${{ runner.os }}-node-3-${{ hashFiles('**/package.json') }} | ||
|
||
- name: Cache cargo registry | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cargo/registry | ||
key: ${{ runner.os }}-cargo-2-registry-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Cache cargo index | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cargo/git | ||
key: ${{ runner.os }}-cargo-2-index-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Cache cargo build | ||
uses: actions/cache@v1 | ||
with: | ||
path: deltachat-core-rust/target | ||
key: ${{ runner.os }}-cargo-2-build-target-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Install | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: npm install --verbose | ||
- name: Test | ||
run: | | ||
npm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Prebuild (Windows) | ||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
prebuild-windows: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Prepare | ||
run: | | ||
rustc -vV | ||
rustup -vV | ||
cargo -vV | ||
npm --version | ||
node --version | ||
- name: Pull submodule | ||
run: npm run submodule | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ env.APPDATA }}/npm-cache # npm cache files are stored in `~/.npm` on Linux/macOS | ||
key: ${{ runner.os }}-node-3-${{ hashFiles('**/package.json') }} | ||
|
||
- name: Cache cargo registry | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cargo/registry | ||
key: ${{ runner.os }}-cargo-2-registry-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Cache cargo index | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cargo/git | ||
key: ${{ runner.os }}-cargo-2-index-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Cache cargo build | ||
uses: actions/cache@v1 | ||
with: | ||
path: deltachat-core-rust/target | ||
key: ${{ runner.os }}-cargo-2-build-target-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Install | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: npm install --verbose | ||
- name: Test | ||
run: | | ||
npm run test | ||
- name: Build Prebuild | ||
run: | | ||
SET ARCHIVE_NAME=%GITHUB_REF%-win32-x64.tar.gz | ||
npm run prebuild | ||
tar -zcvf "%ARCHIVE_NAME%" -C prebuilds . | ||
- name: Upload Prebuild | ||
uses: svenstaro/upload-release-action@v1-release | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: ${{ ARCHIVE_NAME }} | ||
asset_name: ${{ ARCHIVE_NAME }} | ||
tag: ${{ github.ref }} | ||
overwrite: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.