-
Notifications
You must be signed in to change notification settings - Fork 461
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from Hintay/master
Added ARMv5, ARMv6, ARMv7 supports to Action build
- Loading branch information
Showing
7 changed files
with
58 additions
and
23 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,14 @@ | ||
{ | ||
"linux": { | ||
"386": {"arch": "i686", "name": "linux-32"}, | ||
"amd64": {"arch": "x86_64", "name": "linux-64"}, | ||
"arm5": {"arch": "arm", "abi": "eabi", "name": "linux-arm32-v5"}, | ||
"arm6": {"arch": "armv5l", "abi": "eabihf", "name": "linux-arm32-v6"}, | ||
"arm7": {"arch": "armv7l", "abi": "eabihf", "name": "linux-arm32-v7a"}, | ||
"arm64": {"arch": "aarch64", "name": "linux-arm64-v8a"} | ||
}, | ||
"darwin": { | ||
"amd64": {"arch": "o64", "name": "macos-64"}, | ||
"arm64": {"arch": "oa64", "name": "macos-arm64-v8a"} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,13 +84,23 @@ jobs: | |
# Exclude i386 on darwin. | ||
- goarch: 386 | ||
goos: darwin | ||
include: | ||
# BEGIN Linux ARM 5 6 7 | ||
- goos: linux | ||
goarch: arm | ||
goarm: 7 | ||
- goos: linux | ||
goarch: arm | ||
goarm: 6 | ||
- goos: linux | ||
goarch: arm | ||
goarm: 5 | ||
# END Linux ARM 5 6 7 | ||
env: | ||
CGO_ENABLED: 1 | ||
GOOS: ${{ matrix.goos }} | ||
GOARCH: ${{ matrix.goarch }} | ||
DIST: nginx-ui-${{ matrix.GOOS }}-${{ matrix.GOARCH }} | ||
outputs: | ||
dist: ${{ env.DIST }} | ||
GOARM: ${{ matrix.goarm }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
@@ -106,29 +116,34 @@ jobs: | |
path: | | ||
~/.cache/go-build | ||
~/go/pkg/mod | ||
key: ${{ runner.os }}-${{ env.GOOS }}-${{ env.GOARCH }}-go-${{ hashFiles('**/go.sum') }} | ||
key: ${{ runner.os }}-${{ env.GOOS }}-${{ env.GOARCH }}${{ env.GOARM }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ env.GOOS }}-${{ env.GOARCH }}-go- | ||
${{ runner.os }}-${{ env.GOOS }}-${{ env.GOARCH }}${{ env.GOARM }}-go- | ||
- name: Setup compiler environment | ||
id: info | ||
run: | | ||
export _ARCH=$(jq ".[\"$GOARCH\"].$GOOS" -r < .github/build/compiler_arch.json) | ||
echo "::set-output name=ARCH_NAME::$_ARCH" | ||
export _NAME=nginx-ui-$(jq ".$GOOS[\"$GOARCH$GOARM\"].name" -r < .github/build/build_info.json) | ||
export _ARCH=$(jq ".$GOOS[\"$GOARCH$GOARM\"].arch" -r < .github/build/build_info.json) | ||
export _ABI=$(jq ".$GOOS[\"$GOARCH$GOARM\"].abi // \"\"" -r < .github/build/build_info.json) | ||
echo "GOOS: $GOOS, GOARCH: $GOARCH, GOARM: $GOARM, ABI: $_ABI, RELEASE_NAME: $_NAME" | ||
echo "ARCH_NAME=$_ARCH" >> $GITHUB_ENV | ||
echo "ABI=$_ABI" >> $GITHUB_ENV | ||
echo "DIST=$_NAME" >> $GITHUB_ENV | ||
- name: Install musl cross compiler | ||
if: env.GOOS == 'linux' | ||
uses: Lesmiscore/[email protected] | ||
id: musl | ||
with: | ||
target: ${{ steps.info.outputs.ARCH_NAME }}-linux-musl | ||
target: ${{ env.ARCH_NAME }}-linux-musl${{ env.ABI }} | ||
|
||
- name: Post install musl cross compiler | ||
if: env.GOOS == 'linux' | ||
run: | | ||
echo "PATH=${{ steps.musl.outputs.path }}:$PATH" >> $GITHUB_ENV | ||
echo "CC=${{ steps.info.outputs.ARCH_NAME }}-linux-musl-gcc" >> $GITHUB_ENV | ||
echo "CXX=${{ steps.info.outputs.ARCH_NAME }}-linux-musl-g++" >> $GITHUB_ENV | ||
echo "CC=${{ env.ARCH_NAME }}-linux-musl${{ env.ABI }}-gcc" >> $GITHUB_ENV | ||
echo "CXX=${{ env.ARCH_NAME }}-linux-musl${{ env.ABI }}-g++" >> $GITHUB_ENV | ||
echo "LD_FLAGS=--extldflags '-static'" >> $GITHUB_ENV | ||
- name: Install darwin cross compiler | ||
|
@@ -138,8 +153,8 @@ jobs: | |
tar xvaf crossosx.tar.zst | ||
echo "LD_LIBRARY_PATH=$(pwd)/crossosx/lib/" >> $GITHUB_ENV | ||
echo "PATH=$(pwd)/crossosx/bin/:$PATH" >> $GITHUB_ENV | ||
echo "CC=${{ steps.info.outputs.ARCH_NAME }}-clang" >> $GITHUB_ENV | ||
echo "CXX=${{ steps.info.outputs.ARCH_NAME }}-clang++" >> $GITHUB_ENV | ||
echo "CC=${{ env.ARCH_NAME }}-clang" >> $GITHUB_ENV | ||
echo "CXX=${{ env.ARCH_NAME }}-clang++" >> $GITHUB_ENV | ||
echo "LD_FLAGS=-s -w" >> $GITHUB_ENV | ||
- name: Download frontend artifacts | ||
|
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
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