From b9f1aaa0331330e3ebb573d022a6c1822223c277 Mon Sep 17 00:00:00 2001 From: belliash Date: Wed, 19 Jul 2023 20:26:07 +0200 Subject: [PATCH] Migrate to Gitea Actions --- .build.yml | 21 --------------------- .github/workflows/build.yml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 21 deletions(-) delete mode 100644 .build.yml create mode 100644 .github/workflows/build.yml diff --git a/.build.yml b/.build.yml deleted file mode 100644 index 9c54bbc..0000000 --- a/.build.yml +++ /dev/null @@ -1,21 +0,0 @@ -matrix: - platform: - - amd64 - - i686 - -pipeline: - build: - image: codingworkshop/oscw-runner:latest - commands: - - echo "charch ${platform} && ./configure.sh && cd build-${platform}-xtchain && ninja -v && ninja diskimg -v" > build.cmds - - xtchain < build.cmds - publish: - image: codingworkshop/oscw-runner:latest - secrets: - - OSCW_ARTIFACTS_HOSTNAME - - OSCW_ARTIFACTS_USERNAME - - OSCW_ARTIFACTS_USERKEY - commands: - - tar -I 'gzip' -cpf ExectOS-$(date +'%Y%m%d')-${CI_COMMIT_SHA:0:10}-${platform}.tar.gz -C build-${platform}-xtchain/output/binaries . - - gzip -c build-${platform}-xtchain/output/disk.img > ExectOS-$(date +'%Y%m%d')-${CI_COMMIT_SHA:0:10}-${platform}.img.gz - - artifact_publish "ExectOS-$(date +'%Y%m%d')-${CI_COMMIT_SHA:0:10}-${platform}.*.gz" ExectOS diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..6f2e8e7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,31 @@ +name: Builds +run-name: ${{ github.actor }} runs Gitea Actions +on: [push] + +jobs: + ExectOS: + strategy: + matrix: + arch: [amd64, i686] + runs-on: oscw + container: + image: codingworkshop/oscw-runner:latest + steps: + - name: Clone repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Build ExectOS + run: | + echo "charch ${{ matrix.arch }} && ./configure.sh && cd build-${{ matrix.arch }}-xtchain && ninja -v && ninja diskimg -v" > build.cmds + xtchain < build.cmds + - name: Publish binaries + if: ${{ github.ref == 'refs/heads/master' }} + env: + OSCW_ARTIFACTS_HOSTNAME: ${{ secrets.OSCW_ARTIFACTS_HOSTNAME }} + OSCW_ARTIFACTS_USERNAME: ${{ secrets.OSCW_ARTIFACTS_USERNAME }} + OSCW_ARTIFACTS_USERKEY: ${{ secrets.OSCW_ARTIFACTS_USERKEY }} + run: | + tar -I 'gzip' -cpf ExectOS-$(date +'%Y%m%d')-${GITHUB_SHA:0:10}-${{ matrix.arch }}.tar.gz -C build-${{ matrix.arch }}-xtchain/output/binaries . + gzip -c build-${{ matrix.arch }}-xtchain/output/disk.img > ExectOS-$(date +'%Y%m%d')-${GITHUB_SHA:0:10}-${{ matrix.arch }}.img.gz + artifact_publish "ExectOS-$(date +'%Y%m%d')-${GITHUB_SHA:0:10}-${{ matrix.arch }}.*.gz" ExectOS