|  | 
|  | 1 | +name: Build packages | 
|  | 2 | + | 
|  | 3 | +on: | 
|  | 4 | +  push: | 
|  | 5 | +    branches: [ master ] | 
|  | 6 | +  pull_request: | 
|  | 7 | +    branches: [ master ] | 
|  | 8 | + | 
|  | 9 | +env: | 
|  | 10 | +  CARGO_TERM_COLORS: always | 
|  | 11 | + | 
|  | 12 | +jobs: | 
|  | 13 | +  build-rpm-pkgs: | 
|  | 14 | +    name: Build rpm packages | 
|  | 15 | +    runs-on: ubuntu-latest | 
|  | 16 | +    container: | 
|  | 17 | +      image: fedora:latest | 
|  | 18 | +      # Required by `mock`: | 
|  | 19 | +      ### INFO: It seems that you run Mock in a Docker container. | 
|  | 20 | +      ### Mock though uses container tooling itself (namely Podman) for downloading bootstrap image. | 
|  | 21 | +      ### This might require you to run Mock in 'docker run --privileged'. | 
|  | 22 | +      options: --privileged | 
|  | 23 | +      # It does not seem to be necessary (CI run without it was successful). | 
|  | 24 | +      # However, without it, there appear some errors during `mock` execution. | 
|  | 25 | +      # I've found the solution to these errors here: https://github.com/containers/buildah/issues/3666. | 
|  | 26 | +      # They are related to podman, which is used by `mock` under the hood. | 
|  | 27 | +      volumes: | 
|  | 28 | +        - /var/lib/containers:/var/lib/containers | 
|  | 29 | + | 
|  | 30 | +    strategy: | 
|  | 31 | +      matrix: | 
|  | 32 | +        dist-version: [rocky-9-x86_64, fedora-40-x86_64] | 
|  | 33 | +      fail-fast: false | 
|  | 34 | +     | 
|  | 35 | +    steps: | 
|  | 36 | +      # See: https://github.com/actions/checkout/issues/363 | 
|  | 37 | +      # An issue related to GH actions containers | 
|  | 38 | +      - name: Install git and update safe directory | 
|  | 39 | +        run: | | 
|  | 40 | +          dnf update -y | 
|  | 41 | +          dnf install -y git | 
|  | 42 | +          git config --global --add safe.directory "$GITHUB_WORKSPACE" | 
|  | 43 | +
 | 
|  | 44 | +      - name: Checkout | 
|  | 45 | +        uses: actions/checkout@v4 | 
|  | 46 | +       | 
|  | 47 | +      - name: Build rpm package for ${{ matrix.dist-version }} | 
|  | 48 | +        run: ./dist/redhat/build_rpm.sh --target ${{ matrix.dist-version }} | 
|  | 49 | +   | 
|  | 50 | +  build-deb-pkgs: | 
|  | 51 | +    name: Build deb packages | 
|  | 52 | +    runs-on: ubuntu-latest | 
|  | 53 | + | 
|  | 54 | +    strategy: | 
|  | 55 | +      matrix: | 
|  | 56 | +        dist-version: [jammy, noble] | 
|  | 57 | +      fail-fast: false | 
|  | 58 | +     | 
|  | 59 | +    steps: | 
|  | 60 | +      - name: Checkout | 
|  | 61 | +        uses: actions/checkout@v4 | 
|  | 62 | +       | 
|  | 63 | +      - name: Build deb package for ${{ matrix.dist-version }} | 
|  | 64 | +        run: ./dist/debian/build_deb.sh --target ${{ matrix.dist-version }} | 
0 commit comments