aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/test-selfhosted.yaml
blob: e85595d8d6d7db19dbe5fcc5236438b203499a3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: test self-hosted runner

on:
  schedule:
    # schedule build every night
    - cron: "0 0 * * *"
  workflow_dispatch:

jobs:
  build:
    name: Build 
    #runs-on: ubuntu-22.04
    runs-on: self-hosted
    container:
      # Runner docker image
      image: ubuntu:22.04
    strategy:
      fail-fast: false
      matrix:
        job:
          - { name: "amd64",   target: "x86_64-unknown-linux-musl" }
          - { name: "arm64v8", target: "aarch64-unknown-linux-musl" }
          - { name: "armv7",   target: "armv7-unknown-linux-musleabihf" }
          - { name: "i386",    target: "i686-unknown-linux-musl" }
          - { name: "amd64fb",    target: "x86_64-unknown-freebsd" }

    steps:
      
      - name: Checkout
        uses: actions/checkout@v3

      - name: Install toolchain
        uses: actions-rs/toolchain@v1
        with:
          toolchain: "stable"
          override: true
          default: true
          components: rustfmt
          profile: minimal
          target: ${{ matrix.job.target }}

      - name: Exec sqkx
        run: |
          cargo install sqlx-cli

      - name: Build
        uses: actions-rs/cargo@v1
        with:
          command: build
          args: --release --target=${{ matrix.job.target }}
          use-cross: true