ci: try different versions of upload/download artifact #20
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: Test and bundle | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
- ci | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup zig | |
uses: goto-bus-stop/setup-zig@v2 | |
with: | |
version: 0.12.0-dev.3667+77abd3a96 | |
- name: Fetch the tablemodel | |
run: | | |
wget 'https://github.com/fjebaker/lineprofiles/releases/download/v0.1.0/kerr-transfer-functions-v0.1.0.zip' | |
unzip kerr-transfer-functions-v0.1.0.zip | |
- name: Build and test | |
run: zig build test | |
bundle: | |
needs: test | |
strategy: | |
matrix: | |
target: [x86_64-linux-gnu, aarch64-linux-gnu, x86_64-macos-none, aarch64-macos-none] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup zig | |
uses: goto-bus-stop/setup-zig@v2 | |
with: | |
version: 0.12.0-dev.3667+77abd3a96 | |
- name: Build and cache | |
run: zig build xspec -Doptimize=ReleaseFast -Dtarget=${{matrix.target}} | |
- name: Move artifact | |
run: mv zig-out/lib/libxsklineprofiles.* ./xspec | |
- name: Upload artifacts | |
uses: actions/upload-artifact@master | |
with: | |
name: ${{matrix.target}}-lineprofiles.tar.gz | |
path: ./xspec | |
xspec: | |
needs: bundle | |
runs-on: ubuntu-latest | |
container: fjebaker/heasoft:ci-6.33.1-amd64 | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@348754975ef0295bfa2c111cba996120cfdf8a5d | |
with: | |
name: x86_64-linux-gnu-lineprofiles.tar.gz | |
path: . | |
- name: Unpack and locate | |
run: | | |
ls -la | |
mv x86_64-linux-gnu-lineprofiles/* ./ | |
ls -la | |
- name: Fetch the tablemodel | |
run: | | |
wget --no-check-certificate 'https://github.com/fjebaker/lineprofiles/releases/download/v0.1.0/kerr-transfer-functions-v0.1.0.zip' | |
- uses: montudor/action-zip@v1 | |
with: | |
args: unzip kerr-transfer-functions-v0.1.0.zip | |
- name: Build XSPEC script | |
run: | | |
cat <<EOF > smoke_test.xcm | |
statistic chi | |
method leven 10 0.01 | |
abund angr | |
xsect vern | |
cosmo 70 0 0.73 | |
xset delta 0.01 | |
systematic 0 | |
hmake | |
lmod klineprofiles . | |
model kconv5*gaussian | |
0.998 0.001 -0.998 -0.998 0.998 0.998 | |
60 1 0 0 90 90 | |
1 0.1 1 1 100 100 | |
400 0.1 1 1 400 1000 | |
3 1 0 0 10 10 | |
3 1 0 0 1e+10 1e+10 | |
3 1 0 0 1e+10 1e+10 | |
3 1 0 0 1e+10 1e+10 | |
3 1 0 0 1e+10 1e+10 | |
3 1 0 0 1e+10 1e+10 | |
6.5 0.05 0 0 1e+06 1e+06 | |
0.1 0.05 0 0 10 20 | |
1 0.01 0 0 1e+20 1e+24 | |
bayes off | |
exit | |
EOF | |
- name: Run smoke test | |
run: xspec - smoke_test.xcm | |