diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b5d8d9d..5f1533d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,9 +14,6 @@ on: - '*' paths-ignore: - '**.md' - pull_request: - paths-ignore: - - '**.md' env: DOCKERHUB_SLUG: crazymax/rtorrent-rutorrent diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml new file mode 100644 index 0000000..8a7e2e6 --- /dev/null +++ b/.github/workflows/pull.yml @@ -0,0 +1,111 @@ +name: pull + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + pull_request: + paths-ignore: + - '**.md' + +jobs: + build_amd64: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - + name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Build + uses: docker/bake-action@v4 + with: + files: | + ./docker-bake.hcl + ${{ steps.meta.outputs.bake-file }} + targets: image-amd64 + + build_arm64: + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - + name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Build + uses: docker/bake-action@v4 + with: + files: | + ./docker-bake.hcl + ${{ steps.meta.outputs.bake-file }} + targets: image-arm64 + + build_arm_v6: + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - + name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Build + uses: docker/bake-action@v4 + with: + files: | + ./docker-bake.hcl + ${{ steps.meta.outputs.bake-file }} + targets: image-arm-v6 + + build_arm_v7: + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - + name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Build + uses: docker/bake-action@v4 + with: + files: | + ./docker-bake.hcl + ${{ steps.meta.outputs.bake-file }} + targets: image-arm-v7 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 6e6eadc..fa386cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -110,7 +110,7 @@ RUN tree ${DIST_PATH} WORKDIR /usr/local/src/cares COPY --from=src-cares /src . -RUN ./configure +RUN ./configure --disable-tests RUN make -j$(nproc) CFLAGS="-O2 -flto" RUN make install -j$(nproc) RUN make DESTDIR=${DIST_PATH} install -j$(nproc) @@ -136,7 +136,7 @@ RUN ./configure \ --disable-wininet-client \ --disable-libwww-client RUN make -j$(nproc) -RUN make install -j$(nproc) CXXFLAGS="-flto" +RUN make install -j$(nproc) CXXFLAGS="-w -flto" RUN make DESTDIR=${DIST_PATH} install -j$(nproc) RUN tree ${DIST_PATH} @@ -148,7 +148,7 @@ RUN ./autogen.sh RUN ./configure \ --with-posix-fallocate RUN make -j$(nproc) -RUN make install -j$(nproc) CXXFLAGS="-O2 -flto" +RUN make install -j$(nproc) CXXFLAGS="-w -O2 -flto" RUN make DESTDIR=${DIST_PATH} install -j$(nproc) RUN tree ${DIST_PATH} @@ -165,7 +165,7 @@ RUN ./autogen.sh RUN ./configure \ --with-xmlrpc-c \ --with-ncurses -RUN make -j$(nproc) CXXFLAGS="-O2 -flto" +RUN make -j$(nproc) CXXFLAGS="-w -O2 -flto" RUN make install -j$(nproc) RUN make DESTDIR=${DIST_PATH} install -j$(nproc) RUN tree ${DIST_PATH} diff --git a/docker-bake.hcl b/docker-bake.hcl index c3744dd..74f49ec 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -30,3 +30,31 @@ target "image-all" { "linux/arm64" ] } + +target "image-amd64" { + inherits = ["image"] + platforms = [ + "linux/amd64" + ] +} + +target "image-arm64" { + inherits = ["image"] + platforms = [ + "linux/arm64" + ] +} + +target "image-arm-v6" { + inherits = ["image"] + platforms = [ + "linux/arm/v6" + ] +} + +target "image-arm-v7" { + inherits = ["image"] + platforms = [ + "linux/arm/v7" + ] +} \ No newline at end of file