Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
name: Build
strategy:
matrix:
go-version: [1.15.x, 1.14.x]
go-version: [1.18.x, 1.17.x]
platform: [ubuntu-latest]
#platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
Expand All @@ -32,7 +32,16 @@ jobs:
- name: Cache-Go
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
'%LocalAppData%\go-build'
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand All @@ -57,6 +66,12 @@ jobs:
if: matrix.platform == 'ubuntu-latest'
run: |
go run ./ci/run-tests.go $TAGS $COVERAGE
- name: static-check
uses: dominikh/staticcheck-action@v1.2.0
with:
install-go: false
cache-key: ${{ matrix.platform }}
version: "2022.1"
- name: Upload-Coverage
if: matrix.platform == 'ubuntu-latest'
uses: codecov/codecov-action@v1
24 changes: 0 additions & 24 deletions .github/workflows/lint.yml

This file was deleted.

1 change: 1 addition & 0 deletions ci/run-tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build ignore
// +build ignore

package main
Expand Down
1 change: 1 addition & 0 deletions cmd/root-fuse/fuse.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !windows
// +build !windows

package main
Expand Down
11 changes: 6 additions & 5 deletions cmd/root-fuse/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !windows
// +build !windows

// Command root-fuse mounts the contents of a ROOT file as a local directory.
//
// Usage:
//
// $> root-fuse [OPTIONS] <ROOT file> <mount-dir>
// $> root-fuse [OPTIONS] <ROOT file> <mount-dir>
//
// Example:
//
// $> root-fuse ./testdata/simple.root /mnt/dir
// $> root-fuse -v ./testdata/simple.root /mnt/dir
// $> root-fuse root://eospublic.cern.ch:1094//eos/opendata/atlas/OutreachDatasets/2016-07-29/MC/mc_173045.DYtautauM08to15.root /mnt/dir
// $> root-fuse ./testdata/simple.root /mnt/dir
// $> root-fuse -v ./testdata/simple.root /mnt/dir
// $> root-fuse root://eospublic.cern.ch:1094//eos/opendata/atlas/OutreachDatasets/2016-07-29/MC/mc_173045.DYtautauM08to15.root /mnt/dir
//
// Options:
// -v enable verbose mode
//
// -v enable verbose mode
package main // import "go-hep.org/x/exp/cmd/root-fuse"

import (
Expand Down
10 changes: 5 additions & 5 deletions cmd/root-fuse/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !windows
// +build !windows

package main

import (
"bytes"
"io/ioutil"
"os"
"path/filepath"
"testing"
)

func TestFUSESimple(t *testing.T) {
tmp, err := ioutil.TempDir("", "root-fuse-")
tmp, err := os.MkdirTemp("", "root-fuse-")
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -56,7 +56,7 @@ func TestFUSESimple(t *testing.T) {
t.Fatalf("invalid entry name. got %q. want %q", got, want)
}

got, err := ioutil.ReadFile(filepath.Join(tmp, "tree"))
got, err := os.ReadFile(filepath.Join(tmp, "tree"))
if err != nil {
t.Fatalf("could not read /tmp/tree: %v", err)
}
Expand All @@ -79,7 +79,7 @@ type: TTree
}

func TestFUSEDirs(t *testing.T) {
tmp, err := ioutil.TempDir("", "root-fuse-")
tmp, err := os.MkdirTemp("", "root-fuse-")
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -122,7 +122,7 @@ func TestFUSEDirs(t *testing.T) {
}
}

got, err := ioutil.ReadFile(filepath.Join(tmp, "dir1", "dir11", "h1"))
got, err := os.ReadFile(filepath.Join(tmp, "dir1", "dir11", "h1"))
if err != nil {
t.Fatalf("could not read /tmp/dir1/dir11/h1: %v", err)
}
Expand Down
10 changes: 6 additions & 4 deletions cmd/xrd-fuse/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !windows
// +build !windows

// Command xrd-fuse mounts the directory contents of a remote xrootd server to a local directory.
//
// Usage:
//
// $> xrd-fuse [OPTIONS] <remote-dir> <local-dir>
// $> xrd-fuse [OPTIONS] <remote-dir> <local-dir>
//
// Example:
//
// $> xrd-fuse root://server.example.com/some/dir /mnt
// $> xrd-fuse -v root://server.example.com/some/dir /mnt
// $> xrd-fuse root://server.example.com/some/dir /mnt
// $> xrd-fuse -v root://server.example.com/some/dir /mnt
//
// Options:
// -v enable verbose mode
//
// -v enable verbose mode
package main

import (
Expand Down
29 changes: 26 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,32 @@
module go-hep.org/x/exp

go 1.13
go 1.17

require (
github.com/hanwen/go-fuse v1.0.0
go-hep.org/x/hep v0.28.3
gonum.org/v1/gonum v0.8.2
go-hep.org/x/hep v0.31.1
gonum.org/v1/gonum v0.11.0
)

require (
github.com/go-mmap/mmap v0.6.0 // indirect
github.com/gonuts/binary v0.2.0 // indirect
github.com/hashicorp/go-uuid v1.0.2 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
github.com/jcmturner/gofork v1.0.0 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.2 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/klauspost/compress v1.15.1 // indirect
github.com/pierrec/lz4/v4 v4.1.14 // indirect
github.com/pierrec/xxHash v0.1.5 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064 // indirect
golang.org/x/exp v0.0.0-20210220032938-85be41e4509f // indirect
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 // indirect
golang.org/x/tools v0.1.10 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)
Loading