From 025f265705c80da638ca74b1be9d1d8a9b43e25f Mon Sep 17 00:00:00 2001 From: Matthew Rich Date: Wed, 29 May 2024 00:25:29 -0700 Subject: [PATCH] add build step in fedora job --- .gitea/workflows/release.yaml | 67 ++++++++++++++++++++++++----------- .gitea/workflows/test.yaml | 1 + 2 files changed, 48 insertions(+), 20 deletions(-) diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 1c6da8f..fb40702 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -7,7 +7,7 @@ on: jobs: - build: + build-fedora: runs-on: ubuntu-latest permissions: contents: write @@ -18,21 +18,38 @@ jobs: SSH_AUTH_SOCK: /tmp/ssh.sock ENVIRONMENT: dev volumes: + - "/etc/timezone:/etc/timezone:ro" + - "/etc/localtime:/etc/localtime:ro" - "/etc/gitconfig:/etc/gitconfig:ro" - "/opt/gitea/act_runner/.ssh/known_hosts:/root/.ssh/known_hosts" - "/opt/gitea/act_runner/.gitconfig:/root/.gitconfig:ro" - "/opt/gitea/act_runner/.git-credentials:/root/.git-credentials:ro" - options: --cpus 10 + - "/etc/ssl/certs:/etc/ssl/certs:ro" + options: --cpus 4 steps: - - uses: actions/checkout@v3 - - run: dnf install -y dnf-plugins-core rpm-build rpmdevtools - - run: echo "$(pwd)/go/bin" >> $GITHUB_PATH - - run: dnf builddep -y build/jx.spec - - run: make rpm - - uses: ncipollo/release-action@v1 - with: - artifacts: "jx,/root/rpmbuild/**/*.rpm" - build-focal: + - run: dnf install -y nodejs git make + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - run: dnf install -y dnf-plugins-core rpm-build rpmdevtools + - run: echo "$(pwd)/go/bin" >> $GITHUB_PATH + - run: dnf builddep -y build/jx.spec + - run: make build + - run: make rpm + - name: Archive binary + uses: actions/upload-artifact@v3 + with: + name: "jx-fedora-40" + path: "jx" + - uses: actions/upload-artifact@v3 + with: + name: "RPMS" + path: "/root/rpmbuild/**/*.rpm" + - uses: ncipollo/release-action@v1 + with: + artifacts: "jx,/root/rpmbuild/**/*.rpm" + - run: echo "This job's status is ${{ job.status }}." + build-ubuntu-focal: runs-on: ubuntu-latest permissions: contents: write @@ -42,18 +59,28 @@ jobs: GOPATH: / SSH_AUTH_SOCK: /tmp/ssh.sock ENVIRONMENT: dev + DEBIAN_FRONTEND: noninteractive + TZ: America/Los_Angeles volumes: - "/etc/gitconfig:/etc/gitconfig:ro" - "/opt/gitea/act_runner/.ssh/known_hosts:/root/.ssh/known_hosts" - "/opt/gitea/act_runner/.gitconfig:/root/.gitconfig:ro" - "/opt/gitea/act_runner/.git-credentials:/root/.git-credentials:ro" - options: --cpus 10 + options: --cpus 4 steps: - - uses: actions/checkout@v3 - - run: make build-deps - - run: echo "$(pwd)/go/bin" >> $GITHUB_PATH - - run: make build - - run: make deb - - uses: ncipollo/release-action@v1 - with: - artifacts: "jx" + - run: apt-get -y update && apt-get install -y tzdata + - run: apt-get install -y nodejs git make + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - run: echo "$(pwd)/go/bin" >> $GITHUB_PATH + - run: make ubuntu-deps + - run: make build + - run: make deb + - uses: actions/upload-artifact@v3 + with: + name: "jx-ubuntu-focal" + path: "jx" + - uses: ncipollo/release-action@v1 + with: + artifacts: "jx" diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 4f7dba7..4a57873 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -80,6 +80,7 @@ jobs: - run: dnf install -y dnf-plugins-core rpm-build rpmdevtools - run: echo "$(pwd)/go/bin" >> $GITHUB_PATH - run: dnf builddep -y build/jx.spec + - run: make build - name: Run build run: | make rpm