Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also 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: sylabs/sif
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.3.2
Choose a base ref
...
head repository: sylabs/sif
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.4.0
Choose a head ref
  • 5 commits
  • 4 files changed
  • 2 contributors

Commits on Mar 8, 2022

  1. feat: add riscv64 architecture

    Adam Hughes committed Mar 8, 2022

    Unverified

    No user is associated with the committer email.
    Copy the full SHA
    474691f View commit details

Commits on Mar 9, 2022

  1. Merge pull request #182 from tri-adam/riscv64

    Add RISC-V Architecture
    tri-adam authored Mar 9, 2022

    Verified

    This commit was created on github.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b967dd3 View commit details
  2. ci: refactor goreleaser configuration

    Adam Hughes committed Mar 9, 2022

    Unverified

    No user is associated with the committer email.
    Copy the full SHA
    24d2c94 View commit details
  3. ci: expand linux arch support in goreleaser config

    Adam Hughes committed Mar 9, 2022

    Unverified

    No user is associated with the committer email.
    Copy the full SHA
    34eac67 View commit details
  4. Merge pull request #183 from tri-adam/goreleaser

    Expand goreleaser Build Architectures
    tri-adam authored Mar 9, 2022

    Verified

    This commit was created on github.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3b17b93 View commit details
Showing with 61 additions and 35 deletions.
  1. +52 −31 .goreleaser.yml
  2. +4 −1 pkg/sif/arch.go
  3. +4 −2 pkg/siftool/add.go
  4. +1 −1 pkg/siftool/testdata/TestAddCommands/Add/out.golden
83 changes: 52 additions & 31 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,67 @@
project_name: siftool

release:
github:
owner: sylabs
name: sif
prerelease: auto

changelog:
use: github-native

gomod:
proxy: true
env:
- GOPROXY=https://proxy.golang.org,direct
- GOSUMDB=sum.golang.org

builds:
- binary: siftool
- id: darwin-builds
binary: siftool
goos:
- darwin
- linux
goarch:
- amd64
- arm
- arm64
main: &build-main ./cmd/siftool
mod_timestamp: &build-timestamp '{{ .CommitTimestamp }}'
env: &build-env
- CGO_ENABLED=0
flags: &build-flags '-trimpath'
ldflags: &build-ldflags |
-s
-w
-X main.version={{ .Version }}
-X main.date={{ .CommitDate }}
-X main.builtBy=goreleaser
-X main.commit={{ .FullCommit }}

- id: linux-builds
binary: siftool
goos:
- linux
goarch:
- '386'
- 'amd64'
- 'arm'
- 'arm64'
- 'mips'
- 'mips64'
- 'mips64le'
- 'mipsle'
- 'ppc64'
- 'ppc64le'
- 'riscv64'
- 's390x'
goarm:
- '6'
- '7'
env:
- CGO_ENABLED=0
flags: '-trimpath'
ldflags: '-s -w -X main.version={{ .Version }} -X main.commit={{ .FullCommit }} -X main.date={{ .CommitDate }} -X main.builtBy=goreleaser'
main: ./cmd/siftool
mod_timestamp: '{{ .CommitTimestamp }}'
main: *build-main
mod_timestamp: *build-timestamp
env: *build-env
flags: *build-flags
ldflags: *build-ldflags

archives:
- format: tar.gz
wrap_in_directory: 'true'
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
files:
- README.md

checksum:
name_template: '{{ .ProjectName }}-{{ .Version }}-checksums.txt'
- id: darwin-archives
builds:
- darwin-builds

changelog:
sort: asc
filters:
exclude:
- '^dev:'
- '^docs:'
- '^test:'
- '^Merge branch'
- '^Merge pull request'
- id: linux-archives
builds:
- linux-builds
5 changes: 4 additions & 1 deletion pkg/sif/arch.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021, Sylabs Inc. All rights reserved.
// Copyright (c) 2021-2022, Sylabs Inc. All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the
// LICENSE file distributed with the sources of this project regarding your
// rights to use or distribute this software.
@@ -18,6 +18,7 @@ var (
hdrArchMIPS64 archType = [...]byte{'0', '9', '\x00'}
hdrArchMIPS64le archType = [...]byte{'1', '0', '\x00'}
hdrArchS390x archType = [...]byte{'1', '1', '\x00'}
hdrArchRISCV64 archType = [...]byte{'1', '2', '\x00'}
)

type archType [3]byte
@@ -36,6 +37,7 @@ func getSIFArch(arch string) archType {
"mips64": hdrArchMIPS64,
"mips64le": hdrArchMIPS64le,
"s390x": hdrArchS390x,
"riscv64": hdrArchRISCV64,
}

t, ok := archMap[arch]
@@ -59,6 +61,7 @@ func (t archType) GoArch() string {
hdrArchMIPS64: "mips64",
hdrArchMIPS64le: "mips64le",
hdrArchS390x: "s390x",
hdrArchRISCV64: "riscv64",
}

arch, ok := archMap[t]
6 changes: 4 additions & 2 deletions pkg/siftool/add.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019-2021, Sylabs Inc. All rights reserved.
// Copyright (c) 2019-2022, Sylabs Inc. All rights reserved.
// Copyright (c) 2017, SingularityWare, LLC. All rights reserved.
// Copyright (c) 2017, Yannick Cote <yhcote@gmail.com> All rights reserved.
// This software is licensed under a 3-clause BSD license. Please consult the
@@ -66,7 +66,7 @@ func addFlags(fs *pflag.FlagSet) {
1-386, 2-amd64, 3-arm,
4-arm64, 5-ppc64, 6-ppc64le,
7-mips, 8-mipsle, 9-mips64,
10-mips64le, 11-s390x`)
10-mips64le, 11-s390x, 12-riscv64`)
signHash = fs.Int32("signhash", 0, `the signature hash used (with -datatype 5-Signature)
[NEEDED, no default]:
1-SHA256, 2-SHA384, 3-SHA512,
@@ -130,6 +130,8 @@ func getArch() string {
return "mips64le"
case 11:
return "s390x"
case 12:
return "riscv64"
default:
return "unknown"
}
2 changes: 1 addition & 1 deletion pkg/siftool/testdata/TestAddCommands/Add/out.golden
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ Flags:
1-386, 2-amd64, 3-arm,
4-arm64, 5-ppc64, 6-ppc64le,
7-mips, 8-mipsle, 9-mips64,
10-mips64le, 11-s390x
10-mips64le, 11-s390x, 12-riscv64
--partfs int32 the filesystem used (with -datatype 4-Partition)
[NEEDED, no default]:
1-Squash, 2-Ext3, 3-ImmuObj,