Skip to content

Commit

Permalink
Merge pull request #11 from thallgren/thallgren/amd64
Browse files Browse the repository at this point in the history
Ensure macOS amd64 build.
  • Loading branch information
P0lip authored Dec 2, 2024
2 parents 8aba0a0 + 8b0d70d commit ed10454
Show file tree
Hide file tree
Showing 18 changed files with 547 additions and 623 deletions.
9 changes: 3 additions & 6 deletions .github/actions/build-linux/action.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Build fuseftp on Linux
description: Builds the fuseftp binary on Linux amd64 and arm64
inputs:
go-version:
description: Version of the go distro, e.g. 1.20
required: true
upload:
default: false
runs:
Expand All @@ -16,9 +13,9 @@ runs:
sudo apt-get update
sudo apt-get install -y libfuse-dev gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
- name: Setup go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
go-version: stable
- name: Make fuseftp-linux-amd64
shell: bash
run: CGO_ENABLED=1 make fuseftp
Expand All @@ -27,7 +24,7 @@ runs:
run: CGO_ENABLED=1 GOARCH=arm64 CC=aarch64-linux-gnu-gcc make fuseftp
- name: Upload binaries
if: ${{ inputs.upload }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: linux-binaries
path: build-output/bin
Expand Down
11 changes: 4 additions & 7 deletions .github/actions/build-macos/action.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Build fuseftp on Linux
description: Builds the fuseftp binary on Linux amd64 and arm64
inputs:
go-version:
description: Version of the go distro, e.g. 1.19
required: true
upload:
default: false
runs:
Expand All @@ -15,18 +12,18 @@ runs:
brew update
brew install --cask macfuse
- name: Setup go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
go-version: stable
- name: Make fuseftp-darwin-amd64
shell: bash
run: CGO_ENABLED=1 make fuseftp
run: CGO_ENABLED=1 GOARCH=amd64 make fuseftp
- name: Make fuseftp-darwin-arm64
shell: bash
run: CGO_ENABLED=1 GOARCH=arm64 make fuseftp
- name: Upload binaries
if: ${{ inputs.upload }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: macos-binaries
path: build-output/bin
Expand Down
9 changes: 3 additions & 6 deletions .github/actions/build-windows/action.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Build fuseftp on Linux
description: Builds the fuseftp binary on Linux amd64 and arm64
inputs:
go-version:
description: Version of the go distro, e.g. 1.20
required: true
upload:
default: false
runs:
Expand All @@ -18,9 +15,9 @@ runs:
run: |
Start-Process msiexec -Wait -verb runAs -Args "/i winfsp.msi /passive /qn /L*V winfsp-install.log"
[Environment]::SetEnvironmentVariable("Path", "C:\\;C:\\Program Files (x86)\\WinFsp\\inc\\fuse;$ENV:Path", "Machine")
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
go-version: stable
- name: Make fuseftp-windows-amd64
shell: bash
run: CGO_ENABLED=0 make fuseftp
Expand All @@ -29,7 +26,7 @@ runs:
run: CGO_ENABLED=0 GOARCH=arm64 make fuseftp
- name: Upload binaries
if: ${{ inputs.upload }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: windows-binaries
path: build-output/bin
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,26 @@ jobs:
upload-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run build
uses: ./.github/actions/build-linux
with:
go-version: '1.20'
upload: true
upload-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run build
uses: ./.github/actions/build-macos
with:
go-version: '1.20'
upload: true
upload-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run build
uses: ./.github/actions/build-windows
with:
go-version: '1.20'
upload: true
release:
runs-on: ubuntu-latest
Expand All @@ -41,9 +38,9 @@ jobs:
- upload-windows
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "linux-binaries/*,macos-binaries/*,windows-binaries/*"
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
12 changes: 3 additions & 9 deletions .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run build
uses: ./.github/actions/build-linux
with:
go-version: '1.20'
- name: Run lint
run: make lint
- name: Update /etc/fuse.conf
Expand All @@ -32,11 +30,9 @@ jobs:
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run build
uses: ./.github/actions/build-macos
with:
go-version: '1.20'
- name: Run tests
# We are not currently running the tests on macOS because the brew install doesn't
# fix the Kext-Loading. The tests must remain disabled until GitHub provides a macOS
Expand All @@ -48,11 +44,9 @@ jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run build
uses: ./.github/actions/build-windows
with:
go-version: '1.20'
- name: Run tests
shell: bash
run: CGO_ENABLED=0 go test ./...
27 changes: 12 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,34 +1,31 @@
module github.com/datawire/go-fuseftp

go 1.20
go 1.23.1

require (
github.com/datawire/go-ftpserver v0.1.3
github.com/datawire/go-fuseftp/rpc v0.3.1
github.com/jlaffaye/ftp v0.1.0
github.com/sirupsen/logrus v1.9.0
github.com/stretchr/testify v1.8.1
github.com/datawire/go-fuseftp/rpc v0.4.5
github.com/jlaffaye/ftp v0.2.0
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.8.3
github.com/winfsp/cgofuse v1.5.0
golang.org/x/sys v0.7.0
google.golang.org/grpc v1.54.0
google.golang.org/protobuf v1.30.0
golang.org/x/sys v0.27.0
google.golang.org/grpc v1.68.0
google.golang.org/protobuf v1.35.2
)

require (
github.com/datawire/dlib v1.3.1-0.20220715022530-b09ab2e017e1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fclairamb/ftpserverlib v0.21.0 // indirect
github.com/fclairamb/go-log v0.4.1 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/afero v1.9.5 // indirect
golang.org/x/net v0.9.0 // indirect
golang.org/x/text v0.9.0 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
golang.org/x/net v0.31.0 // indirect
golang.org/x/text v0.20.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241118233622-e639e219e697 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/datawire/go-fuseftp/rpc => ./rpc
Loading

0 comments on commit ed10454

Please sign in to comment.