Create aarch64.yml #1
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
name: Build aarch64 | |
on: | |
schedule: | |
- cron: '0 0 * * 0' | |
workflow_dispatch: | |
push: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
check-update: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Checkout new tags to branches | |
id: checkout-tags | |
uses: chachako/checkout-tags@v1 | |
with: | |
base: cloudflare/cloudflared | |
token: ${{ github.token }} | |
overwrite: false | |
- name: Cache Go modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: build cf-go | |
if: ${{ steps.checkout-tags.outputs.up-to-date }} | |
run: | | |
git clone https://github.com/cloudflare/go --depth 1 | |
cd go/src | |
./make.bash | |
chmod +x ../bin/go | |
- name: build aarch64-cloudflared | |
if: ${{ steps.checkout-tags.outputs.up-to-date }} | |
run: | | |
cd /home/runner/work/cloudflared/cloudflared | |
git clone https://github.com/cloudflare/cloudflared --depth 1 | |
cd cloudflared/cmd/cloudflared | |
for tune in generic cortex-a35 cortex-a53 cortex-a55 cortex-a57 cortex-a72 cortex-a73 cortex-a75 cortex-a76 cortex-a76ae cortex-a77 cortex-a65 cortex-a65ae cortex-a34 cortex-a78 cortex-a78ae cortex-a78c ares exynos-m1 emag falkor neoverse-512tvb neoverse-e1 neoverse-n1 neoverse-n2 neoverse-v1 neoverse-v2 qdf24xx saphira phecda xgene1 vulcan octeontx octeontx81 octeontx83 octeontx2 octeontx2t98 octeontx2t96 octeontx2t93 octeontx2f95 octeontx2f95n octeontx2f95mm a64fx thunderx thunderxt88 thunderxt88p1 thunderxt81 tsv110 thunderxt83 thunderx2t99 thunderx3t110 zeus cortex-a57.cortex-a53 cortex-a72.cortex-a53 cortex-a73.cortex-a35 cortex-a73.cortex-a53 cortex-a75.cortex-a55 cortex-a76.cortex-a55 cortex-r82 cortex-x1 cortex-x1c cortex-x2 cortex-x3 cortex-x4 cortex-a510 cortex-a520 cortex-a710 cortex-a715 cortex-a720 ampere1 ampere1a ampere1b cobalt-100 native; do | |
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 /home/runner/work/cloudflared/cloudflared/go/bin/go build -a -trimpath -installsuffix cgo -ldflags "-s -w -extldflags \"-static\"" -mtune=$tune . | |
mv cloudflared cloudflared-$tune | |
done | |
CGO_ENABLED=0 GOOS=linux GOARCH=mipsle GOMIPS=softfloat /home/runner/work/cloudflared/cloudflared/go/bin/go build -a -trimpath -installsuffix cgo -ldflags '-s -w -extldflags "-static"' . | |
mv cloudflared cloudflared-mipsle | |
CGO_ENABLED=0 GOOS=linux GOARCH=mips64 GOMIPS=softfloat /home/runner/work/cloudflared/cloudflared/go/bin/go build -a -trimpath -installsuffix cgo -ldflags '-s -w -extldflags "-static"' . | |
mv cloudflared cloudflared-mips64 | |
CGO_ENABLED=0 GOOS=linux GOARCH=mips64 GOMIPS=hardfloat /home/runner/work/cloudflared/cloudflared/go/bin/go build -a -trimpath -installsuffix cgo -ldflags '-s -w -extldflags "-static"' . | |
mv cloudflared cloudflared-mips64hf | |
CGO_ENABLED=0 GOOS=linux GOARCH=mips64le GOMIPS=softfloat /home/runner/work/cloudflared/cloudflared/go/bin/go build -a -trimpath -installsuffix cgo -ldflags '-s -w -extldflags "-static"' . | |
mv cloudflared cloudflared-mips64le | |
CGO_ENABLED=0 GOOS=linux GOARCH=mips64le GOMIPS=hardfloat /home/runner/work/cloudflared/cloudflared/go/bin/go build -a -trimpath -installsuffix cgo -ldflags '-s -w -extldflags "-static"' . | |
mv cloudflared cloudflared-mips64lehf | |
CGO_ENABLED=0 GOOS=linux GOARCH=mips GOMIPS=softfloat /home/runner/work/cloudflared/cloudflared/go/bin/go build -a -trimpath -installsuffix cgo -ldflags '-s -w -extldflags "-static"' . | |
mv cloudflared cloudflared-mips | |
cd /home/runner/work/cloudflared/cloudflared | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cloudflared-aarch64 | |
path: /home/runner/work/cloudflared/cloudflared/cloudflared/cmd/cloudflared/cloudflared-* | |
compression-level: 0 | |
- name: Get latest tag | |
id: latest_tag | |
uses: anothrNick/github-tag-action@1.35.0 | |
env: | |
DEFAULT_BUMP: patch | |
WITH_V: true | |
DEFAULT_BRANCH: main | |
RELEASE_BRANCHES: main | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: steps.latest_tag.outputs.new_tag | |
with: | |
make_latest: "true" | |
tag_name: ${{ steps.latest_tag.outputs.new_tag }} | |
files: /home/runner/work/cloudflared/cloudflared/cloudflared/cmd/cloudflared/cloudflared-* | |
token: ${{ github.token }} | |
fail_on_unmatched_files: false |