Commit 5adf31cac2
Unsigned
Layout: unified · split
.github/workflows/release.yml added +80
| @@ -0,0 +1,80 @@ | |||
| 1 | on: [push] | ||
| 2 | |||
| 3 | name: build-and-test-and-release | ||
| 4 | |||
| 5 | jobs: | ||
| 6 | x86_64_musl: | ||
| 7 | name: Ubuntu 18.04 | ||
| 8 | runs-on: ubuntu-18.04 | ||
| 9 | strategy: | ||
| 10 | matrix: | ||
| 11 | rust: | ||
| 12 | - stable | ||
| 13 | steps: | ||
| 14 | - name: Checkout sources | ||
| 15 | uses: actions/checkout@v2 | ||
| 16 | |||
| 17 | - name: Install toolchain | ||
| 18 | uses: actions-rs/toolchain@v1 | ||
| 19 | with: | ||
| 20 | toolchain: stable | ||
| 21 | target: x86_64-unknown-linux-musl | ||
| 22 | override: true | ||
| 23 | |||
| 24 | - name: Install dependencies for musl libc | ||
| 25 | run: | | ||
| 26 | sudo apt-get update | ||
| 27 | sudo apt-get install musl-tools | ||
| 28 | - name: Run cargo build | ||
| 29 | uses: actions-rs/cargo@v1 | ||
| 30 | with: | ||
| 31 | command: build | ||
| 32 | args: --release --target x86_64-unknown-linux-musl | ||
| 33 | |||
| 34 | - name: Run cargo test | ||
| 35 | uses: actions-rs/cargo@v1 | ||
| 36 | with: | ||
| 37 | command: test | ||
| 38 | args: --target x86_64-unknown-linux-musl | ||
| 39 | |||
| 40 | - name: Upload binary | ||
| 41 | uses: actions/upload-artifact@v2 | ||
| 42 | with: | ||
| 43 | name: 'weechat-matrix-rs-x86_64-unknown-linux-musl' | ||
| 44 | path: target/x86_64-unknown-linux-musl/release/weechat-matrix-rs | ||
| 45 | |||
| 46 | x86_64_glibc: | ||
| 47 | name: Ubuntu 18.04 (glibc) | ||
| 48 | runs-on: ubuntu-18.04 | ||
| 49 | strategy: | ||
| 50 | matrix: | ||
| 51 | rust: | ||
| 52 | - stable | ||
| 53 | steps: | ||
| 54 | - name: Checkout sources | ||
| 55 | uses: actions/checkout@v2 | ||
| 56 | |||
| 57 | - name: Install toolchain | ||
| 58 | uses: actions-rs/toolchain@v1 | ||
| 59 | with: | ||
| 60 | toolchain: stable | ||
| 61 | override: true | ||
| 62 | |||
| 63 | - name: Run cargo build | ||
| 64 | uses: actions-rs/cargo@v1 | ||
| 65 | with: | ||
| 66 | command: build | ||
| 67 | args: --release | ||
| 68 | |||
| 69 | - name: Run cargo test | ||
| 70 | uses: actions-rs/cargo@v1 | ||
| 71 | with: | ||
| 72 | command: test | ||
| 73 | args: --release | ||
| 74 | |||
| 75 | - name: Upload binary | ||
| 76 | uses: actions/upload-artifact@v2 | ||
| 77 | with: | ||
| 78 | name: 'weechat-matrix-rs-x86_64-unknown-linux-gnu' | ||
| 79 | path: target/release/weechat-matrix-rs | ||
| 80 | |||