1+ name : LOCI Analysis
2+ on :
3+ push :
4+ branches :
5+ - loci/main-*
6+ pull_request :
7+ types : [opened, synchronize, reopened]
8+
9+ jobs :
10+ loci :
11+ if : vars.UPSTREAM_REPO != ''
12+ runs-on : ubuntu-latest
13+
14+ env :
15+ LOCI_PROJECT : ' gitoxide'
16+ LOCI_API_KEY : ' ${{ secrets.LOCI_API_KEY }}'
17+ LOCI_BACKEND_URL : ' ${{ vars.LOCI_BACKEND_URL }}'
18+ GH_TOKEN : ${{ secrets.MIRROR_REPOS_WRITE_PAT }}
19+ CC_aarch64_unknown_linux_gnu : " aarch64-linux-gnu-gcc"
20+ CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER : " aarch64-linux-gnu-gcc"
21+ RUSTFLAGS : " -C debuginfo=2"
22+ OPENSSL_STATIC : " 1"
23+
24+ environment : ${{ vars.LOCI_ENV || 'PROD__AL_DEMO' }}
25+
26+ steps :
27+ - name : Checkout repository
28+ uses : actions/checkout@v4
29+ with :
30+ fetch-depth : 0
31+ ref : ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.sha }}
32+
33+ - name : Compute target
34+ id : target
35+ if : github.event_name == 'push'
36+ run : |
37+ branch="${{ github.ref_name }}"
38+ sha="${branch#loci/main-}"
39+ echo "value=main@${sha}" >> "$GITHUB_OUTPUT"
40+
41+ - name : Compute base
42+ id : base
43+ if : github.event_name == 'pull_request'
44+ run : |
45+ git remote add upstream "https://github.com/${{ vars.UPSTREAM_REPO }}.git" 2>/dev/null || true
46+ git fetch upstream
47+ upstream_default=$(gh api "repos/${{ vars.UPSTREAM_REPO }}" --jq .default_branch)
48+ merge_base=$(git merge-base HEAD "upstream/${upstream_default}")
49+ short_sha="${merge_base:0:7}"
50+ echo "value=main@${short_sha}" >> "$GITHUB_OUTPUT"
51+
52+ - name : Install dependencies
53+ run : sudo apt install gcc-aarch64-linux-gnu && rustup target add aarch64-unknown-linux-gnu
54+ shell : bash -euo pipefail {0}
55+
56+ - name : Build
57+ run : cargo build --target aarch64-unknown-linux-gnu --release --bins --no-default-features --features max-pure
58+ shell : bash -euo pipefail {0}
59+
60+ - name : Upload
61+ uses : auroralabs-loci/loci-action@v1
62+ with :
63+ mode : upload
64+ binaries : |
65+ target/aarch64-unknown-linux-gnu/release/ein
66+ target/aarch64-unknown-linux-gnu/release/gix
67+ project : ' ${{ env.LOCI_PROJECT }}'
68+ target : ${{ steps.target.outputs.value || ''}}
69+ base : ${{ steps.base.outputs.value || '' }}
0 commit comments