Fixes makefile #4418
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: BuildAndTest | |
on: [pull_request, workflow_dispatch] | |
env: | |
CHIFRA_PATH: src/apps/chifra | |
# Go Version | |
GO_VERSION: 1.23 | |
jobs: | |
Lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
cache: false | |
cache-dependency-path: ${{ env.CHIFRA_PATH }}/go.sum | |
- name: Generate go.work file | |
run: | | |
./scripts/go-work-sync.sh | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v4 | |
with: | |
version: v1.61.0 | |
working-directory: ${{ env.CHIFRA_PATH }} | |
args: --timeout=5m --verbose --out-format=colored-line-number | |
skip-pkg-cache: true | |
Build: | |
needs: Lint | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout TrueBlocks repo | |
uses: actions/checkout@v4 | |
- name: Use a certain version of go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Install prerequistes | |
run: | | |
sudo apt-mark hold grub-efi-amd64-signed | |
sudo apt-get update --fix-missing | |
sudo apt-get upgrade | |
sudo apt-get install build-essential git cmake | |
sudo apt-get install python3 tree jq | |
sudo apt-get install libcurl3-dev | |
- name: Run basic golang unit tests | |
run: | | |
mkdir -p build | |
cd build | |
../scripts/go-work-sync.sh | |
cmake ../src | |
cd other/install | |
make | |
cd ../../../ | |
cd ${{ env.CHIFRA_PATH }} | |
export TB_NO_PROVIDER_CHECK=true | |
go test ./... | |
RemoteTests: | |
needs: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Run tests remotely | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.TESTING_HOST }} | |
username: ${{ secrets.TESTING_USERNAME }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
command_timeout: 40m | |
script: | | |
rm -rf testing/${{ github.sha }} | |
mkdir -p testing/${{ github.sha }} | |
mkdir -p test_results/${{ github.sha }} | |
cd testing/${{ github.sha }} | |
git clone --quiet https://github.com/${{ github.repository }} | |
cd trueblocks-core | |
git checkout ${{ github.head_ref }} | |
git submodule update --init --recursive | |
cd scripts | |
CONFIG_FILE=$HOME/trueBlocks.toml bash test-with-docker.sh ${{ github.repository }} ${{ github.sha }} ${{ github.head_ref }} | |
docker system prune -af --filter "until=1h" | |
echo "Results placed in /home/testuser/testing/${{ github.sha }}" |