-
Notifications
You must be signed in to change notification settings - Fork 0
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
Will
committed
Aug 24, 2023
0 parents
commit f9cb516
Showing
4 changed files
with
74 additions
and
0 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,61 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: "*" | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
target: | ||
- aarch64-linux-musl | ||
- armv7-linux-musleabihf | ||
- x86_64-linux-musl | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
submodules: true | ||
- run: | | ||
cp config.mak musl-cross-make | ||
make -C musl-cross-make 2>&1 >> build-$TARGET.log | ||
make -C musl-cross-make install 2>&1 >> build-$TARGET.log | ||
tar -czvf xcc-$TARGET.tar.gz /opt/xcc | ||
env: | ||
TARGET: ${{ matrix.target }} | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: xcc-${{ matrix.target }}.tar.gz | ||
path: xcc-${{ matrix.target }}.tar.gz | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: build-${{ matrix.target }}.log | ||
path: build-${{ matrix.target }}.log | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
path: artifacts | ||
- uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const version = context.sha.substring(0, 8); | ||
github.rest.git.createRef({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
ref: `refs/tags/${version}`, | ||
sha: context.sha | ||
}); | ||
core.setOutput('version', version); | ||
id: create-tag | ||
- uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ steps.create-tag.outputs.version }} | ||
files: artifacts/**/*.tar.gz | ||
needs: build |
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,3 @@ | ||
[submodule "musl-cross-make"] | ||
path = musl-cross-make | ||
url = https://github.com/richfelker/musl-cross-make |
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,9 @@ | ||
MUSL_VER = 1.2.3 | ||
GCC_VER = 11.2.0 | ||
|
||
GCC_CONFIG += --enable-default-pie | ||
|
||
DL_CMD = curl --retry 3 -C - -L -s -o | ||
SHA1_CMD = shasum -a 1 -c | ||
|
||
OUTPUT = /opt/xcc |
Submodule musl-cross-make
added at
fe9158