Skip to content

Commit

Permalink
Pivot to .NET 8 (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbayley authored Apr 16, 2024
1 parent a5239a1 commit f8382a1
Show file tree
Hide file tree
Showing 62 changed files with 2,804 additions and 275 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM mcr.microsoft.com/devcontainers/go:1.22-bookworm
FROM mcr.microsoft.com/devcontainers/dotnet:1-8.0-bookworm
17 changes: 10 additions & 7 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,25 @@
"name": "Gazelle",
"runArgs": ["--name", "gazelle"],
"build": { "dockerfile": "Dockerfile" },
"postCreateCommand": "pwsh Setup.ps1",
"privileged": true,
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/powershell:1": {}
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"customizations": {
"vscode": {
"extensions": [
"golang.go",
"github.copilot",
"github.vscode-github-actions",
"ms-azuretools.vscode-docker",
"ms-vscode.powershell",
"ritwickdey.liveserver",
"grapecity.gc-excelviewer",
"bierner.markdown-preview-github-styles"
"ms-dotnettools.csdevkit",
"ionide.ionide-fsharp",
"ms-vscode.powershell",
"ms-azuretools.vscode-docker",
"ms-dotnettools.dotnet-interactive-vscode",
"bierner.markdown-preview-github-styles",
"tamasfe.even-better-toml"
]
}
}
Expand Down
17 changes: 17 additions & 0 deletions .github/CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
cff-version: 1.2.0
title: Gazelle
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: James
family-names: Bayley
repository-code: 'https://github.com/gazellekit/gazelle'
abstract: >-
A fast, cross-platform engine for structural analysis &
design.
keywords:
- Civil Engineering
- Structural Engineering
license: AGPL-3.0-or-later
File renamed without changes.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [jamesbayley]
21 changes: 15 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,24 @@ defaults:
shell: pwsh

jobs:
build:
name: Build
setup:
name: CI
runs-on: Ubuntu-Latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
go-version-file: ./go.mod
dotnet-version: "8.0.x"

- name: Restore Project
run: ./Setup.ps1

- name: Check Code Formatting
run: dotnet fantomas . --check

- name: Run Test Suite
run: dotnet test
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Go
# .NET
bin/
build/
obj/
.fake

# JavaScript
node_modules/
Expand Down
12 changes: 7 additions & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"recommendations": [
"golang.go",
"github.copilot",
"github.vscode-github-actions",
"ms-azuretools.vscode-docker",
"ms-vscode.powershell",
"ritwickdey.liveserver",
"grapecity.gc-excelviewer",
"bierner.markdown-preview-github-styles"
"ms-dotnettools.csdevkit",
"ionide.ionide-fsharp",
"ms-vscode.powershell",
"ms-azuretools.vscode-docker",
"ms-dotnettools.dotnet-interactive-vscode",
"bierner.markdown-preview-github-styles",
"tamasfe.even-better-toml"
]
}
94 changes: 44 additions & 50 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,46 @@
{
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": "active",
"editor.inlineSuggest.enabled": true,
"editor.rulers": [100],
"editor.tabSize": 2,

"debug.internalConsoleOptions": "neverOpen",

"diffEditor.ignoreTrimWhitespace": false,

"files.exclude": {
"**/.git": false,
},

"git.autofetch": true,
"git.confirmSync": false,
"git.enableSmartCommit": true,

"github.copilot.enable": {
"*": true,
"yaml": true,
"plaintext": false,
"markdown": false
},

"go.gopath": "/go",
"go.useLanguageServer": true,
"go.languageServerFlags": ["-rpc.trace"],
"gopls": {
"ui.semanticTokens": true
},

"[go]": {
"editor.rulers": [80]
},

"powershell.powerShellDefaultVersion": "7",
"powershell.powerShellAdditionalExePaths": {
"pwsh": "/usr/local/bin/pwsh"
},

"liveServer.settings.root": "/docs",
"liveServer.settings.file": "index.html",
"liveServer.settings.host": "localhost",
"liveServer.settings.port": 3000,

"terminal.integrated.fontFamily": "'FiraCode Nerd Font Mono', 'Fira Code', Menlo, Monaco",

"workbench.editor.highlightModifiedTabs": true,
"workbench.editor.wrapTabs": true,
"editor.rulers": [80],
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": "active",
"editor.inlineSuggest.enabled": true,
"editor.detectIndentation": false,
"editor.insertSpaces": true,
"editor.tabSize": 2,

"debug.internalConsoleOptions": "neverOpen",

"diffEditor.ignoreTrimWhitespace": false,

"files.exclude": {
"**/.git": false,
"**/obj": true,
"**/bin": true
},

"git.autofetch": true,
"git.confirmSync": false,
"git.enableSmartCommit": true,

"github.copilot.enable": {
"*": true,
"yaml": true,
"plaintext": false,
"markdown": false
},

"[fsharp]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "Ionide.Ionide-fsharp"
},

"powershell.powerShellDefaultVersion": "7",
"powershell.integratedConsole.showOnStartup": false,
"powershell.powerShellAdditionalExePaths": {
"pwsh": "/usr/bin/pwsh"
},

"terminal.integrated.fontFamily": "'FiraCode Nerd Font Mono', 'Fira Code', Menlo, Monaco",

"workbench.editor.highlightModifiedTabs": true,
"workbench.editor.wrapTabs": true,
}
19 changes: 0 additions & 19 deletions Build.ps1

This file was deleted.

28 changes: 28 additions & 0 deletions Gazelle.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Gazelle", "src\Gazelle.fsproj", "{5428DD04-09FD-41FD-B89B-E58C64DCBDCF}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Gazelle.Tests", "tests\Gazelle.Tests.fsproj", "{D539F49E-5374-4272-BFBB-F198068F1665}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5428DD04-09FD-41FD-B89B-E58C64DCBDCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5428DD04-09FD-41FD-B89B-E58C64DCBDCF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5428DD04-09FD-41FD-B89B-E58C64DCBDCF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5428DD04-09FD-41FD-B89B-E58C64DCBDCF}.Release|Any CPU.Build.0 = Release|Any CPU
{D539F49E-5374-4272-BFBB-F198068F1665}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D539F49E-5374-4272-BFBB-F198068F1665}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D539F49E-5374-4272-BFBB-F198068F1665}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D539F49E-5374-4272-BFBB-F198068F1665}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<p>A fast, cross-platform engine for structural analysis & design.</p>

[![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/noblesource/gazelle)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](https://github.com/noblesource/gazelle/blob/main/CODE_OF_CONDUCT.md)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](https://github.com/gazellekit/gazelle/blob/main/CODE_OF_CONDUCT.md)

[![CI](https://github.com/noblesource/gazelle/actions/workflows/ci.yml/badge.svg)](https://github.com/noblesource/gazelle/actions/workflows/build.yml)
[![License: AGPL-3.0](https://img.shields.io/badge/License-AGPL--3.0-blueviolet)](https://choosealicense.com/licenses/agpl-3.0/)
[![CI](https://github.com/gazellekit/gazelle/actions/workflows/ci.yml/badge.svg)](https://github.com/gazellekit/gazelle/actions/workflows/ci.yml)
[![License: AGPL-3.0](https://img.shields.io/badge/License-AGPL--3.0-00add8)](https://choosealicense.com/licenses/agpl-3.0/)

[![Go](https://img.shields.io/badge/Go-1.22-00add8)](https://go.dev/)
[![.NET](https://img.shields.io/badge/.NET-8.0-8a2be2)](https://dotnet.microsoft.com)
</div>

## Table of Contents
Expand Down Expand Up @@ -77,7 +77,7 @@
- Develop bespoke plugins so that other software can benefit from Gazelle,
- Organise local meetups to discuss how Gazelle could enhance your existing workflows,
- Plan conferences and community engagement events to broaden Gazelle's adoption,
- For Go developers, consider importing Gazelle as a package into your own projects.
- For .NET developers, consider importing Gazelle as a library into your own projects.

## Errata

Expand Down
13 changes: 13 additions & 0 deletions Setup.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Set-Location $PSScriptRoot

$DirectoryCommands = @(
@{ RelativePath = "."; Command = "sudo dotnet workload update" }
@{ RelativePath = "."; Command = "dotnet tool restore" }
@{ RelativePath = "."; Command = "dotnet restore" }
)

$DirectoryCommands | ForEach-Object {
Push-Location $_.RelativePath
Invoke-Expression $_.Command
Pop-Location
}
18 changes: 18 additions & 0 deletions dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": 1,
"isRoot": true,
"tools": {
"fantomas": {
"version": "6.3.4",
"commands": [
"fantomas"
]
},
"powershell": {
"version": "7.4.2",
"commands": [
"pwsh"
]
}
}
}
Loading

0 comments on commit f8382a1

Please sign in to comment.