Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: spacemeshos/post
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2971af20307afa9dc23c1531738c9041911bd5da
Choose a base ref
..
head repository: spacemeshos/post
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b8d87fec53249fe728ec7f76453d278f5d00d0ef
Choose a head ref
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -9,3 +9,8 @@ updates:
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
67 changes: 30 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -10,13 +10,13 @@ on:

jobs:
quicktests:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- name: checkout
uses: actions/checkout@v4
- name: set up go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
check-latest: true
go-version-file: "go.mod"
@@ -28,24 +28,22 @@ jobs:
make test-fmt
make test-tidy
make test-generate
- name: staticcheck
run: make staticcheck
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: checkout
uses: actions/checkout@v4
- name: set up go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
check-latest: true
go-version-file: "go.mod"
- name: setup env
run: make install
- name: lint
run: make lint-github-action
run: make lint

unittests:
runs-on: ${{ matrix.os }}
@@ -57,39 +55,37 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-latest
- [self-hosted, linux, arm64]
- macos-latest
- ubuntu-22.04
- ubuntu-latest-arm-8-cores
- macos-13
- [self-hosted, macos, arm64]
- windows-latest
- windows-2022
steps:
- name: Add OpenCL support - Ubuntu
if: ${{ matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.os == 'ubuntu-22.04' || matrix.os == 'ubuntu-latest-arm-8-cores' }}
run: sudo apt-get update -q && sudo apt-get install -qy ocl-icd-opencl-dev libpocl2
- name: Override SDKROOT for macOS
if: ${{ contains(matrix.os, 'macos') && runner.arch == 'arm64' }}
run: echo "SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk" >> $GITHUB_ENV
- name: disable Windows Defender - Windows
if: ${{ matrix.os == 'windows-latest' }}
if: ${{ matrix.os == 'windows-2022' }}
run: |
Set-MpPreference -DisableRealtimeMonitoring $true
- name: Add OpenCL support - Windows
if: ${{ matrix.os == 'windows-latest' }}
if: ${{ matrix.os == 'windows-2022' }}
run: choco install opencl-intel-cpu-runtime
- name: checkout
uses: actions/checkout@v4
- name: set up go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
check-latest: true
go-version-file: "go.mod"
cache: ${{ runner.arch != 'arm64' }}
- name: setup env
run: make install
- name: Clear test cache
run: make clear-test-cache
- name: unit tests
env:
GOTESTSUM_FORMAT: standard-verbose
GOTESTSUM_FORMAT: standard-quiet
GOTESTSUM_JUNITFILE: unit-tests.xml
run: make test
- name: Publish Test Report
@@ -110,29 +106,27 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-latest
- [self-hosted, linux, arm64]
- macos-latest
- ubuntu-22.04
- ubuntu-latest-arm-8-cores
- macos-13
- [self-hosted, macos, arm64]
- windows-latest
- windows-2022
steps:
- name: Add OpenCL support - Ubuntu
if: ${{ matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.os == 'ubuntu-22.04' || matrix.os == 'ubuntu-latest-arm-8-cores'}}
run: sudo apt-get update -q && sudo apt-get install -qy ocl-icd-opencl-dev libpocl2
- name: Override SDKROOT for macOS
if: ${{ contains(matrix.os, 'macos') && runner.arch == 'arm64' }}
run: echo "SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk" >> $GITHUB_ENV
- name: disable Windows Defender - Windows
if: ${{ matrix.os == 'windows-latest' }}
if: ${{ matrix.os == 'windows-2022' }}
run: |
Set-MpPreference -DisableRealtimeMonitoring $true
- name: checkout
uses: actions/checkout@v4
- name: set up go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
check-latest: true
go-version-file: "go.mod"
cache: ${{ runner.arch != 'arm64' }}
- name: setup env
run: make install
- name: build postcli
@@ -151,7 +145,7 @@ jobs:
echo "OUTNAME=${{ runner.os }}" >> $GITHUB_ENV
fi
- name: Archive postcli artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: postcli-${{ env.OUTNAME }}.zip
path: ./build/*
@@ -161,10 +155,10 @@ jobs:
name: Publish release
if: github.event_name == 'push' && github.ref_type == 'tag'
needs: build
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/assets
- name: Create archives
@@ -174,15 +168,15 @@ jobs:
7z a -tzip "${{ github.workspace }}/artifacts/$(basename $dir)" "$dir/*";
done
- name: Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: ${{ github.workspace }}/artifacts/*.zip
prerelease: false
draft: true
fail_on_unmatched_files: true

coverage:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 30
needs:
- quicktests
@@ -192,7 +186,7 @@ jobs:
run: sudo apt-get update -q && sudo apt-get install -qy ocl-icd-opencl-dev libpocl2
- uses: actions/checkout@v4
- name: set up go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
check-latest: true
go-version-file: "go.mod"
@@ -201,7 +195,6 @@ jobs:
- name: test coverage
run: make cover
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Docker Build and Push

on:
workflow_dispatch:
release:
types: [published]

jobs:
docker-build:
runs-on: ubuntu-22.04
steps:
- name: Git Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: spacemeshos/postcli:latest, spacemeshos/postcli:${{ GITHUB.SHA }}, spacemeshos/postcli:${{ github.ref_name }}
Loading