-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: xiaoleGun <[email protected]> Signed-off-by: sekaiacg <[email protected]>
- Loading branch information
Showing
1 changed file
with
54 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -15,7 +15,7 @@ on: | |
|
||
jobs: | ||
release: | ||
needs: [ Build-on-Ubuntu ] | ||
needs: [ Build-on-Ubuntu, Build-on-macOS ] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
|
@@ -144,3 +144,56 @@ jobs: | |
with: | ||
name: ${{ steps.Artifact.outputs.linuxX86x64Name }} | ||
path: '${{ steps.Artifact.outputs.linuxX86x64Dir }}/${{ steps.Artifact.outputs.linuxX86x64Name }}/*' | ||
|
||
Build-on-macOS: | ||
runs-on: macos-latest | ||
env: | ||
CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion" | ||
CCACHE_NOHASHDIR: "true" | ||
CCACHE_MAXSIZE: "50M" | ||
CCACHE_HARDLINK: "true" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
fetch-depth: 1 | ||
|
||
- name: Install dependencies | ||
run: brew install ccache ninja | ||
|
||
- name: Set up ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ runner.os }} | ||
restore-keys: ${{ runner.os }} | ||
|
||
- name: Build erofs-utils | ||
run: | | ||
chmod a+x build_darwin.sh | ||
./build_darwin.sh | ||
- name: Prepare artifact | ||
if: success() | ||
id: prepareArtifact | ||
run: | | ||
echo "darwinX86x64Dir=target/Darwin_x86_64" >> $GITHUB_OUTPUT | ||
darwinX86x64Name=`ls -d target/Darwin_x86_64/erofs-utils-v*/ | awk -F '(/|.zip)' '{print $3}'` && echo "darwinX86x64Name=$darwinX86x64Name" >> $GITHUB_OUTPUT | ||
echo "darwinAarch64Dir=target/Darwin_aarch64" >> $GITHUB_OUTPUT | ||
darwinAarch64Name=`ls -d target/Darwin_aarch64/erofs-utils-v*/ | awk -F '(/|.zip)' '{print $3}'` && echo "darwinAarch64Name=$darwinAarch64Name" >> $GITHUB_OUTPUT | ||
- name: Upload erofs-utils Darwin_x86_64 | ||
if: success() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ steps.prepareArtifact.outputs.darwinX86x64Name }} | ||
path: '${{ steps.prepareArtifact.outputs.darwinX86x64Dir }}/${{ steps.prepareArtifact.outputs.darwinX86x64Name }}/*' | ||
|
||
- name: Upload erofs-utils Darwin_aarch64 | ||
if: success() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ steps.prepareArtifact.outputs.darwinAarch64Name }} | ||
path: '${{ steps.prepareArtifact.outputs.darwinAarch64Dir }}/${{ steps.prepareArtifact.outputs.darwinAarch64Name }}/*' |