-
Notifications
You must be signed in to change notification settings - Fork 24
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
49db5d5
commit 6039453
Showing
7 changed files
with
75 additions
and
253 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 |
---|---|---|
@@ -1,13 +1,11 @@ | ||
#!/bin/bash | ||
mkdir -p work/release | ||
chmod 755 artifacts/linux-binary/bleep-linux | ||
chmod 755 artifacts/macos-binary/bleep-macos | ||
|
||
mv artifacts/linux-binary/bleep-linux "work/release/bleep-$VERSION-x86-64-pc-linux" | ||
mv artifacts/macos-binary/bleep-macos "work/release/bleep-$VERSION-x86-64-apple-darwin" | ||
mv artifacts/windows-binary/bleep-windows.exe artifacts/windows-binary/bleep.exe | ||
mkdir -p work/release | ||
|
||
mv artifacts/linux-binary/bleep "work/release/bleep-$VERSION-x86-64-pc-linux" | ||
gzip "work/release/bleep-$VERSION-x86-64-pc-linux" | ||
|
||
mv artifacts/macos-binary/bleep "work/release/bleep-$VERSION-x86-64-apple-darwin" | ||
gzip "work/release/bleep-$VERSION-x86-64-apple-darwin" | ||
CWD=$(pwd -P) | ||
(cd artifacts/windows-binary && zip -r "$CWD/work/release/bleep-$VERSION-x86-64-pc-win32.zip" *.exe) | ||
|
||
zip -rj "work/release/bleep-$VERSION-x86-64-pc-win32.zip" artifacts/windows-binary/bleep.exe |
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 |
---|---|---|
|
@@ -15,121 +15,70 @@ jobs: | |
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- uses: graalvm/setup-graalvm@v1 | ||
- uses: coursier/setup-action@v1.2.0-M3 | ||
with: | ||
version: '22.1.0' | ||
java-version: '17' | ||
components: 'native-image' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: coursier/setup-action@v1 | ||
with: | ||
apps: sbt | ||
apps: scalafmt | ||
- uses: coursier/cache-action@v6 | ||
|
||
- name: Scalafmt Check | ||
if: ${{ matrix.os != 'windows-latest' }} | ||
shell: bash | ||
run: sbt --client scalafmtCheckAll | ||
- name: "Test" | ||
shell: bash | ||
run: sbt --client "test" | ||
- name: "Assembly" | ||
shell: bash | ||
run: sbt --client "bleep-cli/assembly" | ||
- name: Temporarily save package | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: java-binary | ||
path: | | ||
${{ github.workspace }}/bleep-cli/target/jvm-2.13/bleep-cli-assembly.jar | ||
retention-days: 1 | ||
- name: Cleanup before cache | ||
shell: bash | ||
run: scalafmt -c .scalafmt.conf --check | ||
|
||
- name: Install bleep stable | ||
run: cs install --channel channel bleep --verbose | ||
|
||
- name: Run tests | ||
run: | | ||
rm -rf "$HOME/.ivy2/local" || true | ||
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true | ||
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true | ||
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true | ||
find $HOME/.sbt -name "*.lock" -delete || true | ||
bleep generate-resources | ||
bleep test | ||
build-native-image: | ||
name: Native image build on ${{ matrix.os }} | ||
needs: [ build ] | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 20 | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
file_name: bleep-linux | ||
file_name: bleep | ||
artifact_name: linux-binary | ||
- os: macos-latest | ||
file_name: bleep-macos | ||
file_name: bleep | ||
artifact_name: macos-binary | ||
- os: windows-latest | ||
file_name: bleep-windows | ||
file_name: bleep.exe | ||
artifact_name: windows-binary | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- name: Download application package | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: java-binary | ||
- uses: graalvm/setup-graalvm@v1 | ||
with: | ||
version: '22.1.0' | ||
java-version: '17' | ||
components: 'native-image' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build native image on Linux | ||
run: mkdir dist && native-image --enable-url-protocols=https -jar bleep-*.jar dist/${{ matrix.file_name }} && chmod 755 dist/${{ matrix.file_name }} | ||
if: runner.os == 'Linux' | ||
|
||
- name: Build native image on Mac OS X | ||
run: mkdir dist && native-image --enable-url-protocols=https -jar bleep-*.jar dist/${{ matrix.file_name }} && chmod 755 dist/${{ matrix.file_name }} | ||
if: runner.os == 'macOS' | ||
|
||
- name: Build native image on Windows | ||
run: >- | ||
mkdir dist && "C:\Program Files (x86)\Microsoft Visual | ||
Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" && native-image --enable-url-protocols=https -jar bleep-*.jar dist/${{ matrix.file_name }} | ||
if: runner.os == 'Windows' | ||
- uses: coursier/[email protected] | ||
- uses: coursier/cache-action@v6 | ||
|
||
- name: Test binary after build on Windows | ||
shell: cmd | ||
run: | | ||
.\dist\${{ matrix.file_name }}.exe --ignore-version-in-build-file generate-resources | ||
.\dist\${{ matrix.file_name }}.exe --ignore-version-in-build-file compile --no-color jvm213 | ||
if: runner.os == 'Windows' | ||
- name: Install bleep stable | ||
run: cs install --channel channel bleep --verbose | ||
|
||
- name: Test binary after build on Linux | ||
- name: Build native image | ||
run: | | ||
chmod 755 dist/${{ matrix.file_name }} | ||
./dist/${{ matrix.file_name }} --ignore-version-in-build-file generate-resources | ||
./dist/${{ matrix.file_name }} --ignore-version-in-build-file compile --no-color jvm213 | ||
if: runner.os == 'Linux' | ||
bleep generate-resources | ||
bleep native-image ${{ matrix.file_name }} | ||
- name: Test binary after build on Macos | ||
- name: Test binary after build | ||
run: | | ||
chmod 755 dist/${{ matrix.file_name }} | ||
./dist/${{ matrix.file_name }} --ignore-version-in-build-file generate-resources | ||
./dist/${{ matrix.file_name }} --ignore-version-in-build-file compile --no-color jvm213 | ||
if: runner.os == 'macOS' | ||
${{ matrix.file_name }} --ignore-version-in-build-file generate-resources | ||
${{ matrix.file_name }} --ignore-version-in-build-file test --no-color jvm213 | ||
- name: Temporarily save package | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ matrix.artifact_name }} | ||
path: | | ||
dist/bleep-* | ||
${{ matrix.file_name }} | ||
retention-days: 1 | ||
|
||
release: | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-latest | ||
needs: [ build-native-image ] | ||
needs: [ build, build-native-image ] | ||
if: "startsWith(github.ref, 'refs/tags/v')" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -151,9 +100,9 @@ jobs: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Release | ||
run: | | ||
chmod +x ./artifacts/linux-binary/bleep-linux | ||
./artifacts/linux-binary/bleep-linux generate-resources | ||
./artifacts/linux-binary/bleep-linux publish | ||
chmod +x ./artifacts/linux-binary/bleep | ||
./artifacts/linux-binary/bleep generate-resources | ||
./artifacts/linux-binary/bleep publish | ||
env: | ||
CI_RELEASE: ${{ secrets.CI_RELEASE }} | ||
CI_SNAPSHOT_RELEASE: ${{ secrets.CI_SNAPSHOT_RELEASE }} | ||
|
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,14 @@ | ||
{ | ||
"repositories": [ | ||
"central" | ||
], | ||
"dependencies": [ | ||
"build.bleep:bleep-core_3:latest.release" | ||
], | ||
"launcherType": "graalvm-native-image", | ||
"prebuiltBinaries": { | ||
"x86_64-pc-linux": "gz+https://github.com/oyvindberg/bleep/releases/download/v${version}/bleep-${version}-x86-64-pc-linux.gz", | ||
"x86_64-pc-win32": "zip+https://github.com/oyvindberg/bleep/releases/download/v${version}/bleep-${version}-x86-64-pc-win32.zip", | ||
"x86_64-apple-darwin": "gz+https://github.com/oyvindberg/bleep/releases/download/v${version}/bleep-${version}-x86-64-apple-darwin.gz" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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