.github/workflows/go.yml | 19 ++++++++++--------- justfile | 7 ++++--- diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 9a1c4d576dde7d8f8c94b1347fdce8f002386136..020268e79d4b0a5fa7267bdce7b4b946a30afefc 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -8,7 +8,7 @@ timeout-minutes: 20 runs-on: ${{ matrix.os }} strategy: matrix: - go-version: ["1.24"] + go-version: [ stable, oldstable] # windows-latest removed for now: known issues with file handles to # resolved. could set classic file io mode. os: [macos-latest, ubuntu-latest] @@ -20,21 +20,22 @@ submodules: true - uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} + - run: brew install macfuse fuse-t && echo 'FUSE_FORCE_BACKEND=fuse-t' >> $GITHUB_ENV + if: matrix.os == 'macos-latest' + - run: | + sudo apt update + sudo apt install -y fuse + if: matrix.os == 'ubuntu-latest' - uses: dtolnay/rust-toolchain@stable + - name: Install just + run: cargo install just - name: Build possum run: | cd storage/possum/lib cargo build --lib - - run: brew install macfuse fuse-t && echo 'FUSE_FORCE_BACKEND=fuse-t' >> $GITHUB_ENV - if: matrix.os == 'macos-latest' - - run: sudo apt install fuse - if: matrix.os == 'ubuntu-latest' # Separate to remove downloading spam and possible caching improvement. - run: go mod download - - run: go test -race ./... - # Separate benchmarks because I think it modifies the stderr handling. - - run: go test -race -bench . -benchtime 2x -run @ ./... - + - run: just test # Test on 386 for atomic alignment and other bad 64-bit assumptions - if: matrix.os != 'macos-latest' run: GOARCH=386 go test -run @ ./... diff --git a/justfile b/justfile index 9747641c4d2717d8b35f45ae50c7cbceaccf589c..35fb4d28a211ef2bd0e9d6156f73d63edf452639 100644 --- a/justfile +++ b/justfile @@ -4,15 +4,16 @@ check: go test -run @ -failfast ./... > /dev/null act: - act -j test --matrix go-version:'1.24' --env-file .empty.env + act -j test --env-file .empty.env -GOPPROF := env("GOPPROF", "http") +export GOPPROF := env("GOPPROF", "http") test-short: build-possum GOPPROF='{{GOPPROF}}' go test -race -failfast -short ./... test *args: build-possum - GOPPROF='{{GOPPROF}}' go test -race -failfast {{ args }} -benchtime 2x -bench . ./... + go test -race {{ args }} ./... + go test -race -run @ -benchtime 2x -bench . ./... build-possum: cd storage/possum/lib && cargo build