From c9f36fd4f5c6df7480ec2d316e5c86b3ccc463c6 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Sun, 5 Jun 2022 14:40:15 +0200 Subject: [PATCH] Add github action (#90) - Add build with ubuntu 18.04 and 20.04 - Add build with GCC and Clang - Add dependabot - Add stalebot Signed-off-by: Bensuperpc --- .github/dependabot.yml | 9 +++++ .github/workflows/Linux.yml | 63 +++++++++++++++++++++++++++++++++++ .github/workflows/expired.yml | 22 ++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/Linux.yml create mode 100644 .github/workflows/expired.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..a9953cb --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +# Set update schedule for GitHub Actions + +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every weekday + interval: "daily" diff --git a/.github/workflows/Linux.yml b/.github/workflows/Linux.yml new file mode 100644 index 0000000..c8c960d --- /dev/null +++ b/.github/workflows/Linux.yml @@ -0,0 +1,63 @@ +name: Build and tests + +on: + push: + branches: + - "*" + paths-ignore: + - "**/README.md" + pull_request: + branches: + - "*" + workflow_dispatch: + +jobs: + build: + name: ${{ matrix.os }} ${{ matrix.compiler }} + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + compiler: [gcc, clang] + os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04] + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Install Linux Dependencies + run: sudo apt-get install build-essential gcc-multilib clang libc6-dev-i386-cross dosfstools mtools xorriso -y + + - name: Make all build32 + env: + C: ${{matrix.compiler}} + working-directory: ./build32 + run: make -j 2 all + + - name: Make clean build32 + working-directory: ./build32 + run: make clean + + - name: Make all build64 + env: + C: ${{matrix.compiler}} + working-directory: ./build64 + run: make -j 2 all + + - name: Make clean build64 + working-directory: ./build64 + run: make clean + + - name: Make iso build32 + env: + C: ${{matrix.compiler}} + working-directory: ./build32 + run: make -j 2 iso + + - name: Make iso build64 + env: + C: ${{matrix.compiler}} + working-directory: ./build64 + run: make -j 2 iso diff --git a/.github/workflows/expired.yml b/.github/workflows/expired.yml new file mode 100644 index 0000000..3836da1 --- /dev/null +++ b/.github/workflows/expired.yml @@ -0,0 +1,22 @@ +name: 'Close stale issues and PRs' +on: + schedule: + - cron: '0 0 */2 * *' +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v4 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + exempt-issue-milestones: 'future,alpha,beta,release' + exempt-pr-milestones: 'bugfix,improvement' + exempt-all-pr-assignees: true + stale-issue-message: 'This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 30 days.' + stale-pr-message: 'This PR is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 30 days.' + close-issue-message: 'This issue was closed because it has been stalled for 30 days with no activity.' + close-pr-message: 'This PR was closed because it has been stalled for 30 days with no activity.' + days-before-issue-stale: 120 + days-before-pr-stale: 120 + days-before-issue-close: 30 + days-before-pr-close: 30