From 69e5fa2c0dafc832e77a91c7fef2c9f56b8d8c57 Mon Sep 17 00:00:00 2001 From: Didier Date: Sun, 16 Jul 2023 19:28:42 +0200 Subject: [PATCH] ci: merge and add step --- .github/workflows/bootpkg.yaml | 22 ------------- .github/workflows/build.yaml | 56 ++++++++++++++++++++++++++++++++++ .github/workflows/pkgr.yaml | 22 ------------- 3 files changed, 56 insertions(+), 44 deletions(-) delete mode 100644 .github/workflows/bootpkg.yaml create mode 100644 .github/workflows/build.yaml delete mode 100644 .github/workflows/pkgr.yaml diff --git a/.github/workflows/bootpkg.yaml b/.github/workflows/bootpkg.yaml deleted file mode 100644 index baf6377..0000000 --- a/.github/workflows/bootpkg.yaml +++ /dev/null @@ -1,22 +0,0 @@ -on: - push: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: install dependencies - run: | - apt update -y - apt install -y curl gcc g++ make - - uses: https://github.com/actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - uses: https://github.com/actions-rs/cargo@v1 - with: - command: check - args: --manifest-path bootpkg/Cargo.toml --verbose --all diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..52bb97b --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,56 @@ +on: + push: + branches: + - main + +jobs: + check: # check if the code compiles + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: install dependencies + run: | + apt update -y + apt install -y curl gcc g++ make + - uses: https://github.com/actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - uses: https://github.com/actions-rs/cargo@v1 + with: + command: check + args: --manifest-path bootpkg/Cargo.toml --verbose --all + - uses: https://github.com/actions-rs/cargo@v1 + with: + command: check + args: --manifest-path pkgr/Cargo.toml --verbose --all + build: # create artifacts and upload them + needs: check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: install dependencies + run: | + apt update -y + apt install -y curl gcc g++ make + - uses: https://github.com/actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - uses: https://github.com/actions-rs/cargo@v1 + with: + command: build + args: --release --manifest-path bootpkg/Cargo.toml --verbose --all + continue-on-error: true + - uses: https://github.com/actions-rs/cargo@v1 + with: + command: build + args: --release --manifest-path pkgr/Cargo.toml --verbose --all + - uses: actions/upload-artifact@v2 + with: + name: bootpkg + path: bootpkg/target/release/bootpkg + - uses: actions/upload-artifact@v2 + with: + name: pkgr + path: pkgr/target/release/pkgr diff --git a/.github/workflows/pkgr.yaml b/.github/workflows/pkgr.yaml deleted file mode 100644 index 6084d80..0000000 --- a/.github/workflows/pkgr.yaml +++ /dev/null @@ -1,22 +0,0 @@ -on: - push: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: install dependencies - run: | - apt update -y - apt install -y curl gcc g++ make - - uses: https://github.com/actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - uses: https://github.com/actions-rs/cargo@v1 - with: - command: check - args: --manifest-path pkgr/Cargo.toml --verbose --all \ No newline at end of file