-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
efd836c
commit 21e1ca1
Showing
5 changed files
with
148 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
name: CD RawrrAssembly | ||
on: | ||
# TODO important remove before actually merging | ||
pull_request: | ||
branches: [ devel ] | ||
workflow_dispatch: | ||
release: | ||
types: [created] | ||
env: | ||
DOTNET_DOCKER: mcr.microsoft.com/dotnet/sdk:8.0 | ||
jobs: | ||
build: | ||
name: Build Assembly | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Pull image | ||
run: docker pull $DOTNET_DOCKER | ||
- name: Build | ||
run: cd inst/rawrrassembly && docker run --rm -v $PWD:/app -w /app $DOTNET_DOCKER /app/build.sh /app /app/out | ||
- name: Publish results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: rawrr | ||
path: inst/rawrrassembly/out | ||
retention-days: 1 | ||
verify-linux: | ||
name: Verify on Linux | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download results | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: rawrr | ||
- name: List result | ||
run: tree | ||
- name: Make executable | ||
run: chmod +x rawrr-linux-x64 | ||
- name: Execute on test file | ||
run: ./rawrr-linux-x64 ./inst/extdata/sample.raw index | ||
verify-windows: | ||
name: Verify on Windows | ||
runs-on: windows-latest | ||
needs: build | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download results | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: rawrr | ||
- name: List result | ||
run: dir | ||
- name: Execute on test file | ||
run: .\rawrr-win-x64.exe .\inst\extdata\sample.raw index | ||
verify-macos: | ||
name: Verify on MacOS | ||
runs-on: macos-latest | ||
needs: build | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download results | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: rawrr | ||
- name: List result | ||
run: ls -l | ||
- name: Make executable | ||
run: chmod +x rawrr-osx-x64 | ||
- name: Execute on test file | ||
run: ./rawrr-osx-x64 ./inst/extdata/sample.raw index | ||
upload-release-artifacts: | ||
name: Upload Release Artifacts | ||
runs-on: ubuntu-latest | ||
needs: | ||
- verify-linux | ||
- verify-windows | ||
- verify-macos | ||
if: github.event_name == 'release' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download all artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: rawrr | ||
path: dist | ||
- name: Upload Release Assets | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
dist/rawrr-linux-x64 | ||
dist/rawrr-win-x64.exe | ||
dist/rawrr-osx-x64 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
ThermoFisher.CommonCore.Data.dll | ||
ThermoFisher.CommonCore.MassPrecisionEstimator.dll | ||
ThermoFisher.CommonCore.RawFileReader.dll | ||
rawrr.exe | ||
*.dll | ||
*.exe | ||
*.zip | ||
publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
|
||
if [ "$#" -ne 2 ]; then | ||
echo "Usage: $0 <project_folder> <output_folder>" | ||
exit 1 | ||
fi | ||
project_folder="$1" | ||
output_folder="$2" | ||
work_folder="/tmp/build" | ||
|
||
# TODO for development only | ||
#apt-get update && apt-get upgrade -y && apt-get install -y zip tree | ||
|
||
# Checkout the deps | ||
mkdir /tmp/build-dir && cd /tmp/build-dir | ||
git clone --depth=1 https://github.com/thermofisherlsms/RawFileReader.git | ||
dotnet nuget add source "$PWD"/RawFileReader/Libs/NetCore/Net8/ | ||
|
||
# Perform the release | ||
cp -r "$project_folder" "$work_folder" | ||
cd "$work_folder" | ||
runtimes="linux-x64 osx-x64 win-x64" | ||
for runtime in $runtimes; do | ||
dotnet publish --runtime "$runtime" -c Release | ||
done | ||
|
||
# TODO for development only | ||
#tree bin/Release/net8.0 | ||
mkdir -p "$output_folder" | ||
|
||
# Export the result | ||
for runtime in $runtimes; do | ||
source_path="bin/Release/net8.0/$runtime/publish" | ||
suffix="" | ||
if [[ "$runtime" == win-* ]]; then | ||
suffix=".exe" | ||
fi | ||
cp "$source_path/rawrr$suffix" "$output_folder/rawrr-$runtime$suffix" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters