diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000..2a973bf --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,66 @@ +name: Build and test + +on: + push: + branches: [ main ] + paths: + - 'src/**' + - 'tests/**' + - 'build/**' + - '.github/**' + pull_request: + branches: [ main ] + paths: + - 'src/**' + - 'tests/**' + - 'build/**' + - '.github/**' + + +jobs: + + build-and-test-linux: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.x.x + - name: make script executable + run: chmod u+x build.sh + - name: Build and test + working-directory: ./ + run: ./build.sh runtest + + build-and-test-windows: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.x.x + - name: Build and test + working-directory: ./ + run: ./build.cmd runtests + + build-and-test-macos: + + runs-on: macos-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.x.x + - name: make script executable + run: chmod u+x build.sh + - name: Build and test + working-directory: ./ + run: ./build.sh runtest diff --git a/FsLab.sln b/FsLab.sln index cc5902e..2e75802 100644 --- a/FsLab.sln +++ b/FsLab.sln @@ -29,6 +29,11 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FsLab.Interactive.Tests", " EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FsLab.Tests", "tests\FsLab.Tests\FsLab.Tests.fsproj", "{5500FA1D-F562-44C4-A9E0-04EB22F8597B}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".ci", ".ci", "{9AD87CE9-074E-4D21-B35A-8A1B389B785D}" + ProjectSection(SolutionItems) = preProject + .github\workflows\build-and-test.yml = .github\workflows\build-and-test.yml + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU