2024-03-03 13:11:25 -08:00
|
|
|
name: Continuous Integration
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2024-05-05 20:20:32 -07:00
|
|
|
- develop
|
2024-03-03 13:11:25 -08:00
|
|
|
pull_request:
|
2024-05-05 20:20:32 -07:00
|
|
|
branches: [develop]
|
2024-03-04 20:07:15 -08:00
|
|
|
workflow_dispatch:
|
2024-03-03 13:11:25 -08:00
|
|
|
jobs:
|
2024-04-28 23:22:37 -07:00
|
|
|
build-windows:
|
|
|
|
name: Build Windows x64
|
2024-07-17 18:28:05 -07:00
|
|
|
runs-on: windows-2019
|
2024-03-03 13:11:25 -08:00
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Setup .NET
|
|
|
|
uses: actions/setup-dotnet@v4
|
|
|
|
with:
|
|
|
|
dotnet-version: 8.0.x
|
|
|
|
- name: Build
|
|
|
|
run: dotnet build -c Release
|
|
|
|
- name: Publish
|
2024-07-25 20:43:59 -07:00
|
|
|
run: dotnet publish src/SourceGit.csproj -c Release -o publish -r win-x64
|
2024-03-03 13:22:26 -08:00
|
|
|
- name: Upload Artifact
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
2024-04-28 23:22:37 -07:00
|
|
|
name: sourcegit.win-x64
|
|
|
|
path: publish
|
|
|
|
build-macos-intel:
|
|
|
|
name: Build macOS (Intel)
|
2024-07-17 18:28:05 -07:00
|
|
|
runs-on: macos-13
|
2024-04-28 23:22:37 -07:00
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Setup .NET
|
|
|
|
uses: actions/setup-dotnet@v4
|
|
|
|
with:
|
|
|
|
dotnet-version: 8.0.x
|
|
|
|
- name: Build
|
|
|
|
run: dotnet build -c Release
|
|
|
|
- name: Publish
|
2024-07-25 20:43:59 -07:00
|
|
|
run: dotnet publish src/SourceGit.csproj -c Release -o publish -r osx-x64
|
2024-05-05 20:18:20 -07:00
|
|
|
- name: Packing Program
|
2024-06-19 20:17:14 -07:00
|
|
|
run: tar -cvf sourcegit.osx-x64.tar -C publish/ .
|
2024-04-28 23:22:37 -07:00
|
|
|
- name: Upload Artifact
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: sourcegit.osx-x64
|
2024-05-05 20:18:20 -07:00
|
|
|
path: sourcegit.osx-x64.tar
|
2024-04-28 23:22:37 -07:00
|
|
|
build-macos-arm64:
|
|
|
|
name: Build macOS (Apple Silicon)
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Setup .NET
|
|
|
|
uses: actions/setup-dotnet@v4
|
|
|
|
with:
|
|
|
|
dotnet-version: 8.0.x
|
|
|
|
- name: Build
|
|
|
|
run: dotnet build -c Release
|
|
|
|
- name: Publish
|
2024-07-25 20:43:59 -07:00
|
|
|
run: dotnet publish src/SourceGit.csproj -c Release -o publish -r osx-arm64
|
2024-05-05 20:18:20 -07:00
|
|
|
- name: Packing Program
|
2024-06-19 20:17:14 -07:00
|
|
|
run: tar -cvf sourcegit.osx-arm64.tar -C publish/ .
|
2024-04-28 23:22:37 -07:00
|
|
|
- name: Upload Artifact
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: sourcegit.osx-arm64
|
2024-05-05 20:18:20 -07:00
|
|
|
path: sourcegit.osx-arm64.tar
|
2024-04-28 23:22:37 -07:00
|
|
|
build-linux:
|
|
|
|
name: Build Linux
|
2024-07-17 18:28:05 -07:00
|
|
|
runs-on: ubuntu-20.04
|
2024-04-28 23:22:37 -07:00
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Setup .NET
|
|
|
|
uses: actions/setup-dotnet@v4
|
|
|
|
with:
|
|
|
|
dotnet-version: 8.0.x
|
|
|
|
- name: Build
|
|
|
|
run: dotnet build -c Release
|
|
|
|
- name: Publish
|
2024-07-25 20:43:59 -07:00
|
|
|
run: dotnet publish src/SourceGit.csproj -c Release -o publish -r linux-x64
|
2024-04-28 23:22:37 -07:00
|
|
|
- name: Rename Executable File
|
|
|
|
run: mv publish/SourceGit publish/sourcegit
|
2024-05-05 20:18:20 -07:00
|
|
|
- name: Packing Program
|
2024-06-19 20:17:14 -07:00
|
|
|
run: tar -cvf sourcegit.linux-x64.tar -C publish/ .
|
2024-04-28 23:22:37 -07:00
|
|
|
- name: Upload Artifact
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: sourcegit.linux-x64
|
2024-05-05 20:18:20 -07:00
|
|
|
path: sourcegit.linux-x64.tar
|
2024-08-02 02:11:45 -07:00
|
|
|
build-linux-arm64:
|
|
|
|
name: Build Linux (arm64)
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Setup .NET
|
|
|
|
uses: actions/setup-dotnet@v4
|
|
|
|
with:
|
|
|
|
dotnet-version: 8.0.x
|
|
|
|
- name: Configure arm64 packages
|
|
|
|
run: |
|
|
|
|
sudo dpkg --add-architecture arm64
|
|
|
|
echo 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal main restricted
|
|
|
|
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted
|
|
|
|
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted' \
|
|
|
|
| sudo tee /etc/apt/sources.list.d/arm64.list
|
|
|
|
sudo sed -i -e 's/^deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
|
|
|
|
sudo sed -i -e 's/^deb mirror/deb [arch=amd64] mirror/g' /etc/apt/sources.list
|
|
|
|
- name: Install cross-compiling dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install clang llvm gcc-aarch64-linux-gnu zlib1g-dev:arm64
|
|
|
|
- name: Build
|
|
|
|
run: dotnet build -c Release
|
|
|
|
- name: Publish
|
|
|
|
run: dotnet publish src/SourceGit.csproj -c Release -o publish -r linux-arm64
|
|
|
|
- name: Rename Executable File
|
|
|
|
run: mv publish/SourceGit publish/sourcegit
|
|
|
|
- name: Packing Program
|
|
|
|
run: tar -cvf sourcegit.linux-arm64.tar -C publish/ .
|
|
|
|
- name: Upload Artifact
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: sourcegit.linux-arm64
|
|
|
|
path: sourcegit.linux-arm64.tar
|