diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..2456b71 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +name: Build Test and Package + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Update Versions + env: + VERSION_PREFIX: 0.8 + VERSION_SUFFIX: ${{github.run_number}} + run: | + VERSION=$VERSION_PREFIX.$VERSION_SUFFIX + sed -i "s:1.0.0:$VERSION:g" Cli/Cli.csproj + sed -i "s:1.0.0:$VERSION:g" Iril/Iril.csproj + - name: Setup .NET + uses: actions/setup-dotnet@v2 + with: + dotnet-version: 6.0.400 + - name: Install ILSpy + run: dotnet tool install ilspycmd -g + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build -c Release --no-restore + - name: Test + run: | + cd Tests + dotnet test -c Release --no-build --verbosity normal + - name: Package + run: | + mkdir PackageOut + cd Cli + dotnet pack -c Release + cp bin/Release/*.nupkg ../PackageOut + - name: Upload Package + uses: actions/upload-artifact@master + with: + path: PackageOut diff --git a/.gitignore b/.gitignore index bb2541b..fde9bc6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +/PackageOut + /*.nupkg /y.output /*.c @@ -60,3 +62,5 @@ Thumbs.db # dotCover *.dotCover + +.fake \ No newline at end of file diff --git a/Cli/Cli.csproj b/Cli/Cli.csproj index 239188c..1e649e3 100644 --- a/Cli/Cli.csproj +++ b/Cli/Cli.csproj @@ -1,14 +1,10 @@ - - - - Exe - netcoreapp2.1 + net6.0 - 0.6 + 1.0.0 praeclarum Compiles LLVM IR, C, and C++ code to .NET Standard assemblies. C;C++;LLVM;IR;Compiler;Native;PInvoke @@ -19,6 +15,10 @@ iril + + + + diff --git a/Iril/Iril.csproj b/Iril/Iril.csproj index ac2eaa6..d35a768 100644 --- a/Iril/Iril.csproj +++ b/Iril/Iril.csproj @@ -2,23 +2,19 @@ netstandard2.0 + 1.0.0 latest cd /Users/fak/Dropbox/Projects/Iril && make LICENSE.txt - - - - 8.0 - - 8.0 + - + diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 884ef4d..c409f22 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp2.0 + net6.0 false @@ -16,7 +16,7 @@ - + diff --git a/global.json b/global.json new file mode 100644 index 0000000..cbe87fa --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "6.0.400" + } +} \ No newline at end of file