From: Victor Julien Date: Sun, 28 Jul 2024 05:26:36 +0000 (+0200) Subject: github-actions: switch dist builders to ubuntu 22.04 X-Git-Tag: suricata-8.0.0-beta1~977 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e48093872412b90c3716f854bfcf63ba3412d0bc;p=thirdparty%2Fsuricata.git github-actions: switch dist builders to ubuntu 22.04 Part of bumping MSRV. 22.04 is the first Ubuntu release to ship a new enough Sphinx. --- diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 6f54273fc6..f91effdc89 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -312,7 +312,7 @@ jobs: name: AlmaLinux 9 Non-Bundled LibHTP runs-on: ubuntu-latest container: almalinux:9 - needs: [prepare-deps, debian-12-dist] + needs: [prepare-deps, ubuntu-22-04-dist] steps: # Cache Rust stuff. - name: Cache cargo registry @@ -491,7 +491,7 @@ jobs: name: CentOS Stream 9 runs-on: ubuntu-latest container: quay.io/centos/centos:stream9 - needs: [prepare-deps, debian-12-dist] + needs: [prepare-deps, ubuntu-22-04-dist] steps: # Cache Rust stuff. - name: Cache cargo registry @@ -2128,7 +2128,7 @@ jobs: name: Ubuntu 20.04 (unsupported rust) runs-on: ubuntu-latest container: ubuntu:20.04 - needs: debian-12-dist + needs: ubuntu-22-04-dist steps: - name: Cache ~/.cargo uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 @@ -2616,8 +2616,6 @@ jobs: autoconf \ automake \ build-essential \ - cargo \ - cbindgen \ cmake \ curl \ dpdk-dev \ @@ -2646,7 +2644,6 @@ jobs: pkg-config \ python3 \ python3-yaml \ - rustc \ sphinx-doc \ sphinx-common \ texlive-latex-base \ @@ -2661,6 +2658,18 @@ jobs: with: name: prep path: prep + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 + with: + name: cbindgen + path: prep + - name: Install Rust + run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain $(grep rust-version rust/Cargo.toml.in|sed 's/\"//g'|awk '{print $3}') -y + - run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH + - name: Setup cbindgen + run: | + mkdir -p $HOME/.cargo/bin + cp prep/cbindgen $HOME/.cargo/bin + chmod 755 $HOME/.cargo/bin/cbindgen - run: tar xf prep/libhtp.tar.gz - run: tar xf prep/suricata-update.tar.gz - run: tar xf prep/suricata-verify.tar.gz @@ -2683,11 +2692,11 @@ jobs: - run: suricata-update -V - run: suricatasc -h - debian-12-dist: - name: Debian 12 Dist Builder + ubuntu-22-04-dist: + name: Ubuntu 22.04 Dist Builder runs-on: ubuntu-latest - container: debian:12 - needs: [prepare-deps] + container: ubuntu:22.04 + needs: [prepare-deps, prepare-cbindgen] steps: # Cache Rust stuff. - name: Cache cargo registry @@ -2706,7 +2715,6 @@ jobs: automake \ build-essential \ cargo \ - cbindgen \ cmake \ curl \ git \ @@ -2749,6 +2757,16 @@ jobs: path: prep - run: tar xf prep/libhtp.tar.gz - run: tar xf prep/suricata-update.tar.gz + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 + with: + name: cbindgen + path: prep + - name: Setup cbindgen + run: | + mkdir -p $HOME/.cargo/bin + cp prep/cbindgen $HOME/.cargo/bin + chmod 755 $HOME/.cargo/bin/cbindgen + echo "$HOME/.cargo/bin" >> $GITHUB_PATH - run: ./autogen.sh - run: CFLAGS="${DEFAULT_CFLAGS}" ./configure - run: make dist @@ -3221,7 +3239,7 @@ jobs: name: PF_RING runs-on: ubuntu-latest container: almalinux:9 - needs: [prepare-deps, debian-12-dist] + needs: [prepare-deps, ubuntu-22-04-dist] steps: # Cache Rust stuff. - name: Cache cargo registry diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 95c766dca0..ea1d862625 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -33,11 +33,35 @@ jobs: name: Prepare dependencies uses: ./.github/workflows/prepare-deps.yml - debian-12-dist: - name: Debian 12 Dist Builder + prepare-cbindgen: + name: Prepare cbindgen runs-on: ubuntu-latest - container: debian:12 - needs: [prepare-deps] + steps: + - name: Cache ~/.cargo + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + with: + path: ~/.cargo + key: ${{ github.job }}-cargo + - name: Installing Rust + run: | + curl https://sh.rustup.rs -sSf | sh -s -- -y + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + rustup target add x86_64-unknown-linux-musl + - name: Building static cbindgen for Linux + run: | + cargo install --target x86_64-unknown-linux-musl --debug cbindgen + cp $HOME/.cargo/bin/cbindgen . + - name: Uploading prep archive + uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b + with: + name: cbindgen + path: . + + ubuntu-22-04-dist: + name: Ubuntu 22.04 Dist Builder + runs-on: ubuntu-latest + container: ubuntu:22.04 + needs: [prepare-deps, prepare-cbindgen] steps: # Cache Rust stuff. - name: Cache cargo registry @@ -56,7 +80,6 @@ jobs: automake \ build-essential \ cargo \ - cbindgen \ cmake \ curl \ git \ @@ -97,6 +120,16 @@ jobs: with: name: prep path: prep + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 + with: + name: cbindgen + path: prep + - name: Setup cbindgen + run: | + mkdir -p $HOME/.cargo/bin + cp prep/cbindgen $HOME/.cargo/bin + chmod 755 $HOME/.cargo/bin/cbindgen + echo "$HOME/.cargo/bin" >> $GITHUB_PATH - run: tar xf prep/libhtp.tar.gz - run: tar xf prep/suricata-update.tar.gz - run: ./autogen.sh