diff --git a/.github/workflows/package_posix.yml b/.github/workflows/package_posix.yml new file mode 100644 index 000000000..27c0e8d15 --- /dev/null +++ b/.github/workflows/package_posix.yml @@ -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_ diff --git a/.github/workflows/package_win.yml b/.github/workflows/package_win.yml new file mode 100644 index 000000000..38e6e1747 --- /dev/null +++ b/.github/workflows/package_win.yml @@ -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_ diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index 663cf7595..0cc8abe14 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -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_ diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 5e76d1765..fc9aa0a6d 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -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_