GH actions: run packaging concurrently with regular tests
This commit is contained in:
1 parent
59d9d1797a
commit
4392d0abbf
4 files changed
+98
-49
No files matched your search
@@ -0,0 +1,54 @@
|
||||
name: package_posix
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
schedule:
|
||||
- cron: "10 3 * * *"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [vs2017-win2016]
|
||||
rust_toolchain: [stable]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Update submodules
|
||||
run: git submodule update --init
|
||||
- name: Install System Deps
|
||||
run: sudo ./get-deps
|
||||
- name: Install Rust
|
||||
run: curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain ${{ matrix.rust_toolchain }}
|
||||
- name: Package
|
||||
run: |
|
||||
source $HOME/.cargo/env
|
||||
cargo build --release --all
|
||||
bash ci/deploy.sh
|
||||
- name: Move macOS Package
|
||||
if: contains(matrix.os, 'macos')
|
||||
run: |
|
||||
mkdir pkg_
|
||||
mv *.zip pkg_
|
||||
- name: Move Linux Package
|
||||
if: contains(matrix.os, 'ubuntu')
|
||||
run: |
|
||||
mkdir pkg_
|
||||
mv *.deb pkg_
|
||||
mv *.xz pkg_
|
||||
- uses: actions/upload-artifact@master
|
||||
if: contains(matrix.os, 'macos')
|
||||
with:
|
||||
name: macos
|
||||
path: pkg_
|
||||
- uses: actions/upload-artifact@master
|
||||
if: contains(matrix.os, 'ubuntu')
|
||||
with:
|
||||
name: linux
|
||||
path: pkg_
|
||||
@@ -0,0 +1,44 @@
|
||||
name: package_win
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
schedule:
|
||||
- cron: "10 3 * * *"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [vs2017-win2016]
|
||||
rust_toolchain: [stable]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Update submodules
|
||||
run: git submodule update --init
|
||||
- name: Install Rust
|
||||
shell: cmd
|
||||
run: |
|
||||
curl -sSf -o rustup-init.exe https://win.rustup.rs
|
||||
rustup-init.exe -yv --default-toolchain ${{ matrix.rust_toolchain }}
|
||||
- name: Package
|
||||
shell: cmd
|
||||
run: |
|
||||
set path "%USERPROFILE%\.cargo\bin;%PATH"
|
||||
cargo build --release --all
|
||||
bash ci/deploy.sh
|
||||
- name: Move Windows Package
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir pkg_
|
||||
mv *.zip pkg_
|
||||
- uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: windows
|
||||
path: pkg_
|
||||
@@ -7,8 +7,6 @@ on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
schedule:
|
||||
- cron: "10 3 * * *"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -45,30 +43,3 @@ jobs:
|
||||
run: |
|
||||
source $HOME/.cargo/env
|
||||
cargo test --all
|
||||
- name: Package
|
||||
if: matrix.rust_toolchain == 'stable'
|
||||
run: |
|
||||
source $HOME/.cargo/env
|
||||
cargo build --release --all
|
||||
bash ci/deploy.sh
|
||||
- name: Move macOS Package
|
||||
if: matrix.rust_toolchain == 'stable' && contains(matrix.os, 'macos')
|
||||
run: |
|
||||
mkdir macos_
|
||||
mv *.zip macos_
|
||||
- name: Move Linux Package
|
||||
if: matrix.rust_toolchain == 'stable' && contains(matrix.os, 'ubuntu')
|
||||
run: |
|
||||
mkdir linux_
|
||||
mv *.deb linux_
|
||||
mv *.xz linux_
|
||||
- uses: actions/upload-artifact@master
|
||||
if: matrix.rust_toolchain == 'stable' && contains(matrix.os, 'macos')
|
||||
with:
|
||||
name: macos
|
||||
path: macos_
|
||||
- uses: actions/upload-artifact@master
|
||||
if: matrix.rust_toolchain == 'stable' && contains(matrix.os, 'ubuntu')
|
||||
with:
|
||||
name: linux
|
||||
path: linux_
|
||||
@@ -7,8 +7,6 @@ on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
schedule:
|
||||
- cron: "10 3 * * *"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -50,21 +48,3 @@ jobs:
|
||||
run: |
|
||||
set path "%USERPROFILE%\.cargo\bin;%PATH"
|
||||
cargo test --all
|
||||
- name: Package
|
||||
shell: cmd
|
||||
if: matrix.rust_toolchain == 'stable'
|
||||
run: |
|
||||
set path "%USERPROFILE%\.cargo\bin;%PATH"
|
||||
cargo build --release --all
|
||||
bash ci/deploy.sh
|
||||
- name: Move Windows Package
|
||||
shell: bash
|
||||
if: matrix.rust_toolchain == 'stable'
|
||||
run: |
|
||||
mkdir pkg_
|
||||
mv *.zip pkg_
|
||||
- uses: actions/upload-artifact@master
|
||||
if: matrix.rust_toolchain == 'stable'
|
||||
with:
|
||||
name: windows
|
||||
path: pkg_
|
||||
Reference in new issue
Block a user