From 8d5f4a0d7a4d02c164447c4aa679d2556ef4201f Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Mon, 29 Jul 2024 17:54:37 +0200 Subject: [PATCH 1/5] Github actions: run update before install See https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/customizing-github-hosted-runners for best practices --- .github/workflows/dependencies.yml | 10 +++++----- .github/workflows/make.yml | 4 ++-- .github/workflows/misc.yml | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 9c49e9bdc..74d069a21 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: install dependencies - run: sudo apt-get install openssl libssl-dev + run: sudo apt-get update && sudo apt-get install openssl libssl-dev - uses: actions/cache@v4 id: tcl-cache with: @@ -45,7 +45,7 @@ jobs: with: path: 'eggdrop' - name: install dependencies - run: sudo apt-get install tcl tcl-dev + run: sudo apt-get update run: sudo apt-get installrun: sudo apt-get install sudo apt-get install tcl tcl-dev - uses: actions/cache@v4 id: ssl-cache with: @@ -73,7 +73,7 @@ jobs: with: path: 'eggdrop' - name: install dependencies - run: sudo apt-get install tcl tcl-dev + run: sudo apt-get update run: sudo apt-get installrun: sudo apt-get install sudo apt-get install tcl tcl-dev - uses: actions/cache@v4 id: ssl-cache with: @@ -113,7 +113,7 @@ jobs: run: | cd $GITHUB_WORKSPACE/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw - name: install dependencies - run: sudo apt-get install tcl tcl-dev + run: sudo apt-get update run: sudo apt-get installrun: sudo apt-get install sudo apt-get install tcl tcl-dev - uses: actions/checkout@v4 with: path: 'eggdrop' @@ -158,7 +158,7 @@ jobs: with: path: 'eggdrop' - name: install dependencies - run: sudo apt-get install tcl tcl-dev + run: sudo apt-get update run: sudo apt-get installrun: sudo apt-get install sudo apt-get install tcl tcl-dev - name: Build run: | cd $GITHUB_WORKSPACE/eggdrop diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index e1dc3be6b..7dc22acd9 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: install dependencies - run: sudo apt-get install clang tcl tcl-dev openssl libssl-dev + run: sudo apt-get update && sudo apt-get install clang tcl tcl-dev openssl libssl-dev - name: Build env: CC: ${{ matrix.cc }} @@ -34,6 +34,6 @@ jobs: steps: - uses: actions/checkout@v4 - name: install dependencies - run: sudo apt-get install tcl tcl-dev openssl libssl-dev + run: sudo apt-get update && sudo apt-get install tcl tcl-dev openssl libssl-dev - name: Build run: ./configure ${{ matrix.conf_tls }} ${{ matrix.conf_ipv6 }} ${{ matrix.conf_tdns }} && make config && make -j4 diff --git a/.github/workflows/misc.yml b/.github/workflows/misc.yml index b6a894b30..2f2490e6e 100644 --- a/.github/workflows/misc.yml +++ b/.github/workflows/misc.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: install dependencies - run: sudo apt-get install build-essential autoconf + run: sudo apt-get update && sudo apt-get install build-essential autoconf - name: Stage configure with revision removed run: | for i in `find . -name configure`; do sed -i 's/From configure.ac .*//' $i; git add $i; done @@ -34,7 +34,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: install dependencies - run: sudo apt-get install build-essential autoconf tcl-dev tcl openssl libssl-dev + run: sudo apt-get update && sudo apt-get install build-essential autoconf tcl-dev tcl openssl libssl-dev - name: Run makedepend run: misc/makedepend - name: Check diff From 2773b82dea894610127f1c619df3cac3b65e3f71 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Mon, 29 Jul 2024 17:56:06 +0200 Subject: [PATCH 2/5] Add manual autoconf action by Geo --- .github/workflows/manual_autoconf.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/manual_autoconf.yml diff --git a/.github/workflows/manual_autoconf.yml b/.github/workflows/manual_autoconf.yml new file mode 100644 index 000000000..3b5694965 --- /dev/null +++ b/.github/workflows/manual_autoconf.yml @@ -0,0 +1,21 @@ +name: Run and Commit autotools +on: + workflow_dispatch: +jobs: + run-script: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Install pre-requisites + run: sudo apt-get update && apt-get install -y build-essential autoconf + - name: Run autotools + run: bash ./misc/runautotools + - name: Commit changes + run: | + git config --global user.name "GitHub Actions" + git config --global user.email "actions@github.com" + git add . + git commit -m "Run autotools" + git push origin develop + From 2ce9ead7bd0c9da5572e8803faab55d846dc333f Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Mon, 29 Jul 2024 18:00:37 +0200 Subject: [PATCH 3/5] Fix syntax errors --- .github/workflows/dependencies.yml | 10 +++++----- .github/workflows/manual_autoconf.yml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 74d069a21..31961a500 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: install dependencies - run: sudo apt-get update && sudo apt-get install openssl libssl-dev + run: sudo apt-get update && apt-get install openssl libssl-dev - uses: actions/cache@v4 id: tcl-cache with: @@ -45,7 +45,7 @@ jobs: with: path: 'eggdrop' - name: install dependencies - run: sudo apt-get update run: sudo apt-get installrun: sudo apt-get install sudo apt-get install tcl tcl-dev + run: sudo apt-get update && apt-get install tcl tcl-dev - uses: actions/cache@v4 id: ssl-cache with: @@ -73,7 +73,7 @@ jobs: with: path: 'eggdrop' - name: install dependencies - run: sudo apt-get update run: sudo apt-get installrun: sudo apt-get install sudo apt-get install tcl tcl-dev + run: sudo apt-get update && apt-get install tcl tcl-dev - uses: actions/cache@v4 id: ssl-cache with: @@ -113,7 +113,7 @@ jobs: run: | cd $GITHUB_WORKSPACE/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw - name: install dependencies - run: sudo apt-get update run: sudo apt-get installrun: sudo apt-get install sudo apt-get install tcl tcl-dev + run: sudo apt-get update && apt-get install tcl tcl-dev - uses: actions/checkout@v4 with: path: 'eggdrop' @@ -158,7 +158,7 @@ jobs: with: path: 'eggdrop' - name: install dependencies - run: sudo apt-get update run: sudo apt-get installrun: sudo apt-get install sudo apt-get install tcl tcl-dev + run: sudo apt-get update && apt-get install tcl tcl-dev - name: Build run: | cd $GITHUB_WORKSPACE/eggdrop diff --git a/.github/workflows/manual_autoconf.yml b/.github/workflows/manual_autoconf.yml index 3b5694965..2f802dc3f 100644 --- a/.github/workflows/manual_autoconf.yml +++ b/.github/workflows/manual_autoconf.yml @@ -8,7 +8,7 @@ jobs: - name: Check out repository code uses: actions/checkout@v4 - name: Install pre-requisites - run: sudo apt-get update && apt-get install -y build-essential autoconf + run: sudo apt-get update && apt-get install build-essential autoconf - name: Run autotools run: bash ./misc/runautotools - name: Commit changes From 88237de7ac6df76a72196c64ef8c26705eaf0655 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Mon, 29 Jul 2024 18:02:13 +0200 Subject: [PATCH 4/5] Add missing sudo --- .github/workflows/dependencies.yml | 10 +++++----- .github/workflows/manual_autoconf.yml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 31961a500..d3dacb753 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: install dependencies - run: sudo apt-get update && apt-get install openssl libssl-dev + run: sudo apt-get update && sudo apt-get install openssl libssl-dev - uses: actions/cache@v4 id: tcl-cache with: @@ -45,7 +45,7 @@ jobs: with: path: 'eggdrop' - name: install dependencies - run: sudo apt-get update && apt-get install tcl tcl-dev + run: sudo apt-get update && sudo apt-get install tcl tcl-dev - uses: actions/cache@v4 id: ssl-cache with: @@ -73,7 +73,7 @@ jobs: with: path: 'eggdrop' - name: install dependencies - run: sudo apt-get update && apt-get install tcl tcl-dev + run: sudo apt-get update && sudo apt-get install tcl tcl-dev - uses: actions/cache@v4 id: ssl-cache with: @@ -113,7 +113,7 @@ jobs: run: | cd $GITHUB_WORKSPACE/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw - name: install dependencies - run: sudo apt-get update && apt-get install tcl tcl-dev + run: sudo apt-get update && sudo apt-get install tcl tcl-dev - uses: actions/checkout@v4 with: path: 'eggdrop' @@ -158,7 +158,7 @@ jobs: with: path: 'eggdrop' - name: install dependencies - run: sudo apt-get update && apt-get install tcl tcl-dev + run: sudo apt-get update && sudo apt-get install tcl tcl-dev - name: Build run: | cd $GITHUB_WORKSPACE/eggdrop diff --git a/.github/workflows/manual_autoconf.yml b/.github/workflows/manual_autoconf.yml index 2f802dc3f..ec11b0c41 100644 --- a/.github/workflows/manual_autoconf.yml +++ b/.github/workflows/manual_autoconf.yml @@ -8,7 +8,7 @@ jobs: - name: Check out repository code uses: actions/checkout@v4 - name: Install pre-requisites - run: sudo apt-get update && apt-get install build-essential autoconf + run: sudo apt-get update && sudo apt-get install build-essential autoconf - name: Run autotools run: bash ./misc/runautotools - name: Commit changes From 5abd5cf1aa1151f4fcd36fb8fbdd6a76d5d80f36 Mon Sep 17 00:00:00 2001 From: Thomas Sader Date: Mon, 29 Jul 2024 18:08:38 +0200 Subject: [PATCH 5/5] Only commit already added files --- .github/workflows/manual_autoconf.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/manual_autoconf.yml b/.github/workflows/manual_autoconf.yml index ec11b0c41..b52e17b43 100644 --- a/.github/workflows/manual_autoconf.yml +++ b/.github/workflows/manual_autoconf.yml @@ -15,7 +15,6 @@ jobs: run: | git config --global user.name "GitHub Actions" git config --global user.email "actions@github.com" - git add . - git commit -m "Run autotools" + git commit -a -m "Run autotools" git push origin develop